crypt_checkpass 2 → 3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/README.md +3 -3
- data/crypt_checkpass.gemspec +1 -1
- data/lib/crypt_checkpass/api.rb +2 -2
- data/lib/crypt_checkpass/pbkdf2.rb +1 -4
- data/lib/crypt_checkpass/scrypt.rb +0 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71ca5cf785b2cee6228688661a1f0e0240dfb709
|
4
|
+
data.tar.gz: 41b818c7453c0837043947bd59311671b4587b93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c9056c681614f35bd941f70f4f570132897bc9a03fe43591e1d668998793289690ebb8fe743b94c4b3d900349c804e3b008768e5bf5597216c16de62c16746f
|
7
|
+
data.tar.gz: e1cee36b81f2ba4741da6b3f9f91696b730671d5d9de08b0560bf58f055a8c214dbf0b3c89c6cba18a79c9fbe66f1ef289114b50631721296f41667f1bcec14e
|
data/Gemfile
CHANGED
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
|
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
|
101
|
+
is officially abandoned by its author:
|
102
102
|
http://phk.freebsd.dk/sagas/md5crypt_eol.html, for another instance
|
103
|
-
module `$3$` is
|
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
|
data/crypt_checkpass.gemspec
CHANGED
data/lib/crypt_checkpass/api.rb
CHANGED
@@ -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?
|
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?
|
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`
|
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.
|
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: '
|
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-
|
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.
|
210
|
+
rubygems_version: 2.5.2.2
|
211
211
|
signing_key:
|
212
212
|
specification_version: 4
|
213
213
|
summary: provides crypt_checkpass / crypt_newhash
|