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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c2f871a780f690af1d6c71ee6ac966a31c04e955
4
- data.tar.gz: efb865e57cce84746c469fe9a5aba80e825fac3f
3
+ metadata.gz: b98225b2e645925d76a0189adf330c81c7b34f68
4
+ data.tar.gz: 8ccf325edde59b1ba96e29ca0c018a3a1cd0abc8
5
5
  SHA512:
6
- metadata.gz: 5f6d7c58f9873cc194eca83fc1acae8554dba2624d98d7bc5c505ed99071119c9af40d77038f7c4ab015465fcdeda22c33910258bfb235d9335b53d4740be7e2
7
- data.tar.gz: 471154df784020f8762d7ef3c41f4ae026764f87b720be581e9e0d8efc26c6ba41944d532015b54423f74b411b264c633ebac39065c18fa6843f216f2481c7f6
6
+ metadata.gz: 2460addc91d22d5f6e846f8a43aa7e4e582a0763482884700f29be44ee48176f5bd3ca492fe78554a2c0c8f3e10be57d9b4b24c32b670b9441440eec6ac5aa86
7
+ data.tar.gz: 9d0cc147b8897251d7329aafa78049bd7099fa1726af94249c0c1062a3ff67c069b77d2228983b914d7e6a2b2ae95ca326e64ee2848956b72b91ac6a3c5f4376
data/CHANGES.md CHANGED
@@ -1,4 +1,4 @@
1
- 4.0.0.pre (2016-12-04)
1
+ 4.0.0 (2016-12-04)
2
2
  ----------------------
3
3
 
4
4
  * [#141](https://github.com/cryptosphere/rbnacl/pull/141)
@@ -81,8 +81,8 @@ module RbNaCl
81
81
  if RbNaCl::Sodium::Version::ARGON2_SUPPORTED
82
82
  true
83
83
  else
84
- raise NoMethodError, "argon2 requires libsodium version >= 1.0.9" \
85
- " (currently running #{RbNaCl::Sodium::Version::STRING})"
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
@@ -4,5 +4,5 @@
4
4
  # NaCl/libsodium for Ruby
5
5
  module RbNaCl
6
6
  # The library's version
7
- VERSION = "4.0.0.pre"
7
+ VERSION = "4.0.0"
8
8
  end
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.pre
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-05 00:00:00.000000000 Z
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: 1.3.1
149
+ version: '0'
150
150
  requirements: []
151
151
  rubyforge_project:
152
152
  rubygems_version: 2.5.2