readable_password_generator 0.0.1 → 0.0.2
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/readable_password_generator.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f5c46394413a24a6a0949cb138f62ce9d38ccb9ee2f739e78ffc479504e1d51
|
4
|
+
data.tar.gz: 224f64facdc46da81b4e05d9d43af4414cb669cbdeae72a1f857c2af222ee218
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db5f55f70f6764163166b9b0a59bcfb03b49ac9821a562339f511536a07979f3e1df228a2e57dc108fe1c03978c722ac50285afd184c07e53e34354213f38bc6
|
7
|
+
data.tar.gz: 6137d025c1ca37a0a9bc515f76c0b1a9ec441c31f2d9dcf3fd492de48336fcc3691e6ac843e359f83e852c4113480cda1a9114882f359009d61165eca6d88c0f
|
@@ -3,7 +3,7 @@ class Password
|
|
3
3
|
#minimum default length is set to 10 by security concerns of a readable password
|
4
4
|
DEFAULT_PW_LENGTH = [10,11,12,13,14,15,16,17,18]
|
5
5
|
|
6
|
-
|
6
|
+
attr_reader :pw_length
|
7
7
|
|
8
8
|
def initialize(a_pw_length = DEFAULT_PW_LENGTH.sample)
|
9
9
|
@pw_length = check_length_value(a_pw_length) #checking on password length value
|
@@ -26,6 +26,11 @@ class Password
|
|
26
26
|
return result = result[0...size]
|
27
27
|
end
|
28
28
|
|
29
|
+
def set_length(a_pw_length)
|
30
|
+
@pw_length = check_length_value(a_pw_length)
|
31
|
+
return nil
|
32
|
+
end
|
33
|
+
|
29
34
|
private
|
30
35
|
|
31
36
|
#sets of character used in generating
|