charmkit 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/charmkit/helpers/crypt.rb +6 -8
- data/lib/charmkit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cab89bb4367d2520c771adeccc76c45e4098adfc
|
4
|
+
data.tar.gz: 351e253c40b3dd3b8470bb54315e5acc76a61d67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aee6d94779fd83872a7d733a14b70b7bde72cc815e2a077a224d95aa6f6e5fe2968d0c72a68b956263044c2553803528d3ff360ae99ff8846a6565ab55a9433
|
7
|
+
data.tar.gz: 5889275117a7f500349ae48e1c17758015419ab2ad3b4e305b33078327b8a07e4202993d286f61963e6eb489dfecb9241a2205d172d07fbd8ca5ac7196c3c0c4
|
@@ -1,13 +1,11 @@
|
|
1
1
|
module Charmkit
|
2
2
|
module Helpers
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
(min...max).map { ('a'..'z').to_a[rand(26)] }.join
|
10
|
-
end
|
3
|
+
# Generate a password salt
|
4
|
+
#
|
5
|
+
# @param [Integer] min mininum number of characters
|
6
|
+
# @param [Integer] max maximum number of characters
|
7
|
+
def gen_salt(min=0, max=20)
|
8
|
+
(min...max).map { ('a'..'z').to_a[rand(26)] }.join
|
11
9
|
end
|
12
10
|
end
|
13
11
|
end
|
data/lib/charmkit/version.rb
CHANGED