phpass-ruby 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/phpass.rb +1 -1
- data/lib/phpass/md5.rb +1 -1
- metadata +2 -9
data/README.md
CHANGED
@@ -12,7 +12,7 @@ All files within this package are in public domain.
|
|
12
12
|
require "phpass"
|
13
13
|
|
14
14
|
# 12 is password strength / calculation time. This is trade-off.
|
15
|
-
# 8 <= strength <=
|
15
|
+
# 8 <= strength <= 30 (default: 8)
|
16
16
|
phpass = Phpass.new(12)
|
17
17
|
|
18
18
|
# Get hashed string. These are different result each time.
|
data/lib/phpass.rb
CHANGED
data/lib/phpass/md5.rb
CHANGED
@@ -6,7 +6,7 @@ class Phpass
|
|
6
6
|
class Md5
|
7
7
|
def initialize(stretch=8)
|
8
8
|
@itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
9
|
-
stretch = 8 unless (8..
|
9
|
+
stretch = 8 unless (8..30).include?(stretch)
|
10
10
|
@stretch = stretch
|
11
11
|
@random_state = '%s%s' % [Time.now.to_f, $$]
|
12
12
|
end
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phpass-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 25
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- uu59
|
@@ -26,7 +25,6 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ~>
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 11
|
30
28
|
segments:
|
31
29
|
- 2
|
32
30
|
- 1
|
@@ -42,7 +40,6 @@ dependencies:
|
|
42
40
|
requirements:
|
43
41
|
- - ~>
|
44
42
|
- !ruby/object:Gem::Version
|
45
|
-
hash: 23
|
46
43
|
segments:
|
47
44
|
- 1
|
48
45
|
- 0
|
@@ -58,7 +55,6 @@ dependencies:
|
|
58
55
|
requirements:
|
59
56
|
- - ~>
|
60
57
|
- !ruby/object:Gem::Version
|
61
|
-
hash: 1
|
62
58
|
segments:
|
63
59
|
- 1
|
64
60
|
- 5
|
@@ -74,7 +70,6 @@ dependencies:
|
|
74
70
|
requirements:
|
75
71
|
- - ">="
|
76
72
|
- !ruby/object:Gem::Version
|
77
|
-
hash: 3
|
78
73
|
segments:
|
79
74
|
- 0
|
80
75
|
version: "0"
|
@@ -112,7 +107,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
107
|
requirements:
|
113
108
|
- - ">="
|
114
109
|
- !ruby/object:Gem::Version
|
115
|
-
hash: 3
|
116
110
|
segments:
|
117
111
|
- 0
|
118
112
|
version: "0"
|
@@ -121,7 +115,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
115
|
requirements:
|
122
116
|
- - ">="
|
123
117
|
- !ruby/object:Gem::Version
|
124
|
-
hash: 3
|
125
118
|
segments:
|
126
119
|
- 0
|
127
120
|
version: "0"
|