random-password 0.1.0 → 0.1.1
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 +4 -4
- data/lib/random/password.rb +1 -1
- data/lib/random/password/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: 65023d19fcf746c04dd1dd72cda7375157364c6d
|
4
|
+
data.tar.gz: 93559b7095fa6a5bba8dac4464eddcb81f6066ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 002c77e48f62ab0809e8e55e604e04677fc0ad5695fb4d775941d5ae034008925d720262f10b5e423b024276ebd078b79c8ddfa02262df9e82f412379320db76
|
7
|
+
data.tar.gz: 9db4aa0ff1c08c8230744e8ac6f54bb6dcceee5922f8065980410f9da83c59356157a6db560e905f139954bb5229349694b423b55097bab06127a3cefbb014f7
|
data/lib/random/password.rb
CHANGED
@@ -6,7 +6,7 @@ module RandomPassword
|
|
6
6
|
# create a one big array of seeding data
|
7
7
|
seed = [('a'..'z'), ('!'..'+'), (1..9), ('A'..'Z')].map { |e| e.to_a }.flatten
|
8
8
|
# get random 16 characters from this array
|
9
|
-
original = (0
|
9
|
+
original = (0...strength).map { seed[rand(seed.length)] }.join
|
10
10
|
# just to be sure, randomize them once more
|
11
11
|
original.split('').shuffle.join
|
12
12
|
end
|