argon2 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77906981397bca22e45f37024785f9aca398f3b3
4
- data.tar.gz: 86be154725f959f1642e8c74526f28eaceaff6f1
3
+ metadata.gz: c4946951c753bf3429884bd17d5ab2f20a5b03ed
4
+ data.tar.gz: d03d063894871e688f6ec7550799760e81b79200
5
5
  SHA512:
6
- metadata.gz: c844a68c9c788217b5b0a1be380b149d19b298c231ba5e00a20da4356eb8e90a5c5cb1f08a307f397fb2cb77f3b1d8d74057beec49727671e34b3d712628d4c5
7
- data.tar.gz: b462c94bbbacaa1682e5fe03208cd4151c6f8f2d5794179bc31b3169ca9cd0f6a324ffc735ed989d0e5b77d09020cd14c54f816e462b07effe48db7f0a3b759d
6
+ metadata.gz: 635d587da7ae973027dac2527cc447cb12e320fe8fb11d9b58c43c59edf758a19ee74dd51e1fd481f696d71ea2b02f3d1f7b624da3b513cc20446226ea5d3112
7
+ data.tar.gz: 886f3914110033c14cc0d7ce17c3bffba83e1f58620771e3eb9e1e9d7498d350d5a2bcf847e3aa3849dbceaa1d8c141472575167e573e44c3a6aaf2ee79faf6a
data/.gitignore CHANGED
@@ -10,4 +10,5 @@
10
10
  /vendor
11
11
  /ext/argon2_wrap/libargon2_wrap.so
12
12
  /ext/argon2_wrap/tests
13
+ /ext/argon2_wrap/libargon2_wrap.bundle*
13
14
  argon2-0.0.2.gem
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.3
3
+ - 2.2.4
4
4
  - 2.3.0
5
5
  - jruby-9000
6
6
  before_install: gem install bundler -v 1.10.5
@@ -0,0 +1,17 @@
1
+ v0.1.0: 2015-11-10
2
+ - Initial release
3
+
4
+ v0.1.1: 2015-11-26
5
+ - Use $CC instead of hardcoded gcc. Allows builds on more systems.
6
+
7
+ v0.1.2: 2015-11-30
8
+ - Introduce handling of binary input, including NULL containing UTF-16
9
+ - Implement property testing variable TEST_CHECKS
10
+
11
+ v0.1.3: 2015-11-30
12
+ - Fix bug on verifying binary password
13
+
14
+ v0.1.4: 2016-01-11
15
+ - Improved OSX compatibility
16
+ - Fix broken m_cost check
17
+
@@ -35,8 +35,8 @@ ifeq ($(KERNEL_NAME), NetBSD)
35
35
  LIB_CFLAGS := -shared -fPIC
36
36
  endif
37
37
  ifeq ($(KERNEL_NAME), Darwin)
38
- LIB_EXT := dylib
39
- LIB_CFLAGS := -dynamiclib -install_name @rpath/lib$(LIB_NAME).$(LIB_EXT)
38
+ LIB_EXT := bundle
39
+ LIB_CFLAGS := -bundle
40
40
  endif
41
41
  ifeq ($(findstring MINGW, $(KERNEL_NAME)), MINGW)
42
42
  LIB_EXT := dll
@@ -11,7 +11,7 @@ module Argon2
11
11
  @t_cost = options[:t_cost] || 2
12
12
  raise ArgonHashFail, "Invalid t_cost" if @t_cost < 1 || @t_cost > 10
13
13
  @m_cost = options[:m_cost] || 16
14
- raise ArgonHashFail, "Invalid m_cost" if @t_cost < 1 || @t_cost > 31
14
+ raise ArgonHashFail, "Invalid m_cost" if @m_cost < 1 || @m_cost > 31
15
15
  @salt = options[:salt_do_not_supply] || Engine.saltgen
16
16
  @secret = options[:secret]
17
17
  end
@@ -47,8 +47,8 @@ module Argon2
47
47
 
48
48
  def self.hash_argon2i_encode(password, salt, t_cost, m_cost, secret)
49
49
  result = ''
50
- secretlen = secret.nil? ? 0 : secret.length
51
- passwordlen = password.nil? ? 0 : password.length
50
+ secretlen = secret.nil? ? 0 : secret.bytesize
51
+ passwordlen = password.nil? ? 0 : password.bytesize
52
52
  if salt.length != Constants::SALT_LEN
53
53
  raise ArgonHashFail, "Invalid salt size"
54
54
  end
@@ -63,8 +63,10 @@ module Argon2
63
63
  end
64
64
 
65
65
  def self.argon2i_verify(pwd, hash, secret)
66
- secretlen = secret.nil? ? 0 : secret.length
67
- ret = Ext.wrap_argon2_verify(hash, pwd, pwd.length, secret, secretlen)
66
+ secretlen = secret.nil? ? 0 : secret.bytesize
67
+ passwordlen = pwd.nil? ? 0 : pwd.bytesize
68
+
69
+ ret = Ext.wrap_argon2_verify(hash, pwd, passwordlen, secret, secretlen)
68
70
  return false if ERRORS[ret] == 'ARGON2_DECODING_FAIL'
69
71
  raise ArgonHashFail, ERRORS[ret] unless ret == 0
70
72
  true
@@ -1,4 +1,4 @@
1
1
  # Standard Gem version constant.
2
2
  module Argon2
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: argon2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Technion
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-30 00:00:00.000000000 Z
11
+ date: 2016-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -132,6 +132,7 @@ files:
132
132
  - ".gitmodules"
133
133
  - ".rubocop.yml"
134
134
  - ".travis.yml"
135
+ - Changelog.md
135
136
  - Gemfile
136
137
  - LICENSE.txt
137
138
  - README.md