rbnacl 4.0.0.pre → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +1 -1
- data/lib/rbnacl/password_hash.rb +2 -2
- data/lib/rbnacl/password_hash/argon2.rb +3 -0
- data/lib/rbnacl/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b98225b2e645925d76a0189adf330c81c7b34f68
|
4
|
+
data.tar.gz: 8ccf325edde59b1ba96e29ca0c018a3a1cd0abc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2460addc91d22d5f6e846f8a43aa7e4e582a0763482884700f29be44ee48176f5bd3ca492fe78554a2c0c8f3e10be57d9b4b24c32b670b9441440eec6ac5aa86
|
7
|
+
data.tar.gz: 9d0cc147b8897251d7329aafa78049bd7099fa1726af94249c0c1062a3ff67c069b77d2228983b914d7e6a2b2ae95ca326e64ee2848956b72b91ac6a3c5f4376
|
data/CHANGES.md
CHANGED
data/lib/rbnacl/password_hash.rb
CHANGED
@@ -81,8 +81,8 @@ module RbNaCl
|
|
81
81
|
if RbNaCl::Sodium::Version::ARGON2_SUPPORTED
|
82
82
|
true
|
83
83
|
else
|
84
|
-
raise
|
85
|
-
|
84
|
+
raise NotImplementedError, "argon2 requires libsodium version >= 1.0.9" \
|
85
|
+
" (currently running #{RbNaCl::Sodium::Version::STRING})"
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
@@ -126,6 +126,7 @@ module RbNaCl
|
|
126
126
|
#
|
127
127
|
# @return [String] argon2 digest string
|
128
128
|
def digest_str(password)
|
129
|
+
raise ArgumentError, "password must be a String" unless password.is_a?(String)
|
129
130
|
result = Util.zeros(STRBYTES)
|
130
131
|
|
131
132
|
ok = self.class.pwhash_str(
|
@@ -144,6 +145,8 @@ module RbNaCl
|
|
144
145
|
#
|
145
146
|
# @return [boolean] true if password matches digest_string
|
146
147
|
def self.digest_str_verify(password, digest_string)
|
148
|
+
raise ArgumentError, "password must be a String" unless password.is_a?(String)
|
149
|
+
raise ArgumentError, "digest_string must be a String" unless digest_string.is_a?(String)
|
147
150
|
pwhash_str_verify(
|
148
151
|
digest_string,
|
149
152
|
password, password.bytesize
|
data/lib/rbnacl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbnacl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-12-
|
12
|
+
date: 2016-12-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -144,9 +144,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: 2.2.6
|
145
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- - "
|
147
|
+
- - ">="
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version:
|
149
|
+
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project:
|
152
152
|
rubygems_version: 2.5.2
|