devise-argon2 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -6
- data/README.md +2 -2
- data/devise-argon2.gemspec +1 -1
- data/lib/devise/encryptable/encryptors/argon2.rb +2 -2
- data/lib/devise/encryptable/encryptors/argon2/version.rb +2 -2
- data/spec/devise-argon2_spec.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a18da5b17816e607aca4eb72c783afe11abf88bd
|
4
|
+
data.tar.gz: 51ae25f373d02302e4f47e690a245de046c17d16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56000989e0cb20a98e7622ee2a252e9e6466330cba7a0470d860e3c44d2dd07d6d05a0a353cb79e26c381ac9b0c26e8184d24ff202f76fe0bf164e1b1d5e52be
|
7
|
+
data.tar.gz: 9f688f915dc3f97845019189e5b35a84599b6042e88691c9a8de517dfb914ec82082023188557cb5d3f747a0ca3b2861a653f66ad4c29b84bd3420030f1f343b
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
devise-argon2 [![Build Status](https://secure.travis-ci.org/erdostom/devise-argon2.png)][Continuous Integration]
|
1
|
+
devise-argon2 [![Build Status](https://secure.travis-ci.org/erdostom/devise-argon2.png)][Continuous Integration] [![Gem Version](https://badge.fury.io/rb/devise-argon2.svg)](https://badge.fury.io/rb/devise-argon2)
|
2
2
|
=============
|
3
3
|
|
4
4
|
**A [devise-encryptable] password encryptor that uses [argon2]**
|
@@ -47,4 +47,4 @@ string that will be used in addition to the per-user `password_salt` when hashin
|
|
47
47
|
|
48
48
|
## Copyright
|
49
49
|
|
50
|
-
Released under MIT License.
|
50
|
+
Released under MIT License.
|
data/devise-argon2.gemspec
CHANGED
@@ -5,7 +5,7 @@ module Devise
|
|
5
5
|
module Encryptors
|
6
6
|
class Argon2 < Base
|
7
7
|
def self.digest(password, stretches, salt, pepper)
|
8
|
-
::Argon2::Password.
|
8
|
+
::Argon2::Password.create("#{password}#{salt}#{pepper}")
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.compare(encrypted_password, password, stretches, salt, pepper)
|
@@ -14,4 +14,4 @@ module Devise
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
17
|
-
end
|
17
|
+
end
|
data/spec/devise-argon2_spec.rb
CHANGED
@@ -9,7 +9,7 @@ describe Devise::Encryptable::Encryptors::Argon2 do
|
|
9
9
|
let(:stretches) { 10 }
|
10
10
|
|
11
11
|
describe ".compare" do
|
12
|
-
let(:encrypted) { Argon2::Password.
|
12
|
+
let(:encrypted) { Argon2::Password.create("#{password}#{salt}#{pepper}").to_s }
|
13
13
|
|
14
14
|
it "is true when comparing an encrypted password against given plaintext" do
|
15
15
|
expect(argon2.compare(encrypted, password, stretches, salt, pepper)).to be true
|
@@ -28,4 +28,4 @@ describe Devise::Encryptable::Encryptors::Argon2 do
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-argon2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tamas Erdos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: argon2
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '1.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '1.0'
|
55
55
|
description: A devise-encryptable password encryptor that uses Argon2
|
56
56
|
email:
|
57
57
|
- tamas at tamaserdos com
|