crypt_checkpass 2 → 3

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: 3c78a28d5c63b16c2ed28cbc183e8c92885fabd2
4
- data.tar.gz: 64bcd424fb5ee0bb15e646ec522fdec98c67f106
3
+ metadata.gz: 71ca5cf785b2cee6228688661a1f0e0240dfb709
4
+ data.tar.gz: 41b818c7453c0837043947bd59311671b4587b93
5
5
  SHA512:
6
- metadata.gz: a6b2ca0a274bc8331b0c2df7b3b774f1c778cc3687705088e1315d480301998ae0f9b9e75813694382ee54c5f6d25815a19cb53e0c84d382086d83c123e8dd68
7
- data.tar.gz: 607b6f1ae9883d3372e4abaf5a15b87c132cf5972d4c6a1180ec972afce8b6f7aedc2ccaa7d6f6b4aae5ea372e8e13c63978bd6fbe52e71f1471b5ba9b010b4e
6
+ metadata.gz: 6c9056c681614f35bd941f70f4f570132897bc9a03fe43591e1d668998793289690ebb8fe743b94c4b3d900349c804e3b008768e5bf5597216c16de62c16746f
7
+ data.tar.gz: e1cee36b81f2ba4741da6b3f9f91696b730671d5d9de08b0560bf58f055a8c214dbf0b3c89c6cba18a79c9fbe66f1ef289114b50631721296f41667f1bcec14e
data/Gemfile CHANGED
@@ -38,4 +38,7 @@ group :test do
38
38
  gem 'fiddle'
39
39
  gem 'openssl'
40
40
  end
41
+ if RUBY_VERSION < '2.4.0'
42
+ gem 'activesupport', '= 5.2.0'
43
+ end
41
44
  end
data/README.md CHANGED
@@ -86,7 +86,7 @@ is bad to use in contemporary programs for several reasons:
86
86
  the parameter(salt), by hand. Failure in generation of a proper
87
87
  salt string tends not to yield any errors; for instance typo in
88
88
  parameters are normally not detectable.
89
- - For instance, in the following example, second invokation of
89
+ - For instance, in the following example, second invocation of
90
90
  `String#crypt` is wrong; it has typo in "round=" (lacks "s").
91
91
  However the call does not fail and something unexpected is
92
92
  generated.
@@ -98,9 +98,9 @@ is bad to use in contemporary programs for several reasons:
98
98
 
99
99
  - Even in the "modular" mode, some hash functions are considered
100
100
  archaic and no longer recommended at all; for instance module `$1$`
101
- is officially abondoned by its author:
101
+ is officially abandoned by its author:
102
102
  http://phk.freebsd.dk/sagas/md5crypt_eol.html, for another instance
103
- module `$3$` is consodered completely broken: see the manpage of
103
+ module `$3$` is considered completely broken: see the manpage of
104
104
  FreeBSD.
105
105
  - On some OS such as Mac OS, there is no modular mode. Yet, as written
106
106
  above, `String#crypt` on Mac OS never fails. This means even if you
@@ -25,7 +25,7 @@
25
25
 
26
26
  Gem::Specification.new do |spec|
27
27
  spec.name = 'crypt_checkpass'
28
- spec.version = 2
28
+ spec.version = 3
29
29
  spec.author = 'Urabe, Shyouhei'
30
30
  spec.email = 'shyouhei@ruby-lang.org'
31
31
  spec.summary = 'provides crypt_checkpass / crypt_newhash'
@@ -172,7 +172,7 @@ class << CryptCheckpass
172
172
  # @param str [String] target string to test.
173
173
  # @return [true] accepted.
174
174
  # @return [false] otherwise.
175
- def match? re, str
175
+ def match? str, re
176
176
  return re.match? str
177
177
  end
178
178
  else
@@ -181,7 +181,7 @@ class << CryptCheckpass
181
181
  # @param str [String] target string to test.
182
182
  # @return [true] accepted.
183
183
  # @return [false] otherwise.
184
- def match? re, str
184
+ def match? str, re
185
185
  md = re.match str
186
186
  return !!md
187
187
  end
@@ -37,7 +37,7 @@
37
37
  #
38
38
  # - `password` is the raw binary password that you want to digest.
39
39
  #
40
- # - `id` is "pbkdf2-{digest}". You can specify sha1 / sha256 / sha512.
40
+ # - `id` is `"pbkdf2-{digest}"`. You can specify sha1 / sha256 / sha512.
41
41
  # Unlike plain SHA1, PBKDF2 + SHA1 combination still has no known weakness
42
42
  # as of writing so specifying pbkdf-sha1 should just suffice normally.
43
43
  #
@@ -65,9 +65,6 @@
65
65
  # }x
66
66
  # ```
67
67
  #
68
- # - This is a strict PHC string format. See also
69
- # {CryptCheckpass::PHCStringFormat}
70
- #
71
68
  # - The `id` can either be "pbkdf2-sha1", "pbkdf2-sha256", or "pbkdf2-sha512".
72
69
  #
73
70
  # - The only parameter `i` is the iteration (rounds) of the calculation.
@@ -85,9 +85,6 @@ require 'securerandom'
85
85
  # }x
86
86
  # ```
87
87
  #
88
- # - This is a strict PHC string format. See also
89
- # {CryptCheckpass::PHCStringFormat}
90
- #
91
88
  # - Parameters are `ln`, `r`, and `p` where `ln` deontes log2(N).
92
89
  #
93
90
  # ### Other formats:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crypt_checkpass
3
3
  version: !ruby/object:Gem::Version
4
- version: '2'
4
+ version: '3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Urabe, Shyouhei
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-26 00:00:00.000000000 Z
11
+ date: 2018-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  version: '0'
208
208
  requirements: []
209
209
  rubyforge_project:
210
- rubygems_version: 2.2.5
210
+ rubygems_version: 2.5.2.2
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: provides crypt_checkpass / crypt_newhash