dynarex-password 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68e42e068bbae11a8456f6d5fd58f06ea3995d38c1d2e014328e3182ffaabdc7
4
- data.tar.gz: 887c5505df16625687505447e83bc0869189de79456702b4bc93072b12997e1c
3
+ metadata.gz: 804d78b3cff553e0897804d6fe8af4d1b47ef7c9f0ef09381d0c0c3e9273ee6c
4
+ data.tar.gz: 6844745fdd6d13b2bc2692369c13bd34cc3f0b70aee0c15371b4397a5fd4ee37
5
5
  SHA512:
6
- metadata.gz: 7cbf6f13ac4e0df47ffb6ae79027f0e459e7e24d5f45163ae4958bf34a3a41c05139da497d4764ee6651b6e20fe659d221df34616326f19d5aaa1dc81ba481dc
7
- data.tar.gz: 786d4e6eddbe1cf55e099db021458b291699eb1063ec565ad7acb8a40dfcc6348d86119aa4265023d87b8682030656a895870001b90333515fce3f11b91a8726
6
+ metadata.gz: 2ad5ecbeeb56fc8982a3634c07e7acf41c8fc4880a91b5f275b130d8061818a8b3e538ab9bb63877e0c4cd8beb062ddbda9fb83b99f09e3e098c727ed1a94c69
7
+ data.tar.gz: 2731177f5b4a6903d89adae87ececee8194834e7eef323022111e297c6f8ddca34296ad1f2719cfe04801828b59a65b7330a54e6968062e178a72ccb6a278dab
checksums.yaml.gz.sig CHANGED
Binary file
@@ -4,6 +4,9 @@
4
4
 
5
5
  require 'dynarex'
6
6
 
7
+ class DynarexPasswordError < Exception
8
+ end
9
+
7
10
  class DynarexPassword
8
11
  using ColouredText
9
12
 
@@ -25,17 +28,22 @@ class DynarexPassword
25
28
  @dx = Dynarex.new('codes[fixedsize]/code(index,value)')
26
29
  @dx.fixedsize = @fixed_size = fixed_size
27
30
 
28
- chars = (0..9).to_a + Array.new(7) + ('A'..'Z').to_a \
29
- + Array.new(6) + ('a'..'z').to_a
31
+ #chars = (0..9).to_a + Array.new(7) + ('A'..'Z').to_a \
32
+ # + Array.new(6) + ('a'..'z').to_a
30
33
  @chars = (0..9).to_a + ('A'..'Z').to_a + ('a'..'z').to_a
31
34
 
32
- chars.each do |char|
35
+ @chars.each do |char|
33
36
 
34
37
  s = get_random_chars(2)
35
38
  @temp_list << s
36
- @dx.create index: char, value: s if char
39
+ @dx.create({index: char, value: s}) if char
37
40
 
38
41
  end
42
+
43
+ # ensure the values are unique
44
+ values = @dx.all.map(&:value)
45
+ raise DynarexPasswordError, 'Values are not uniqe!' if values != values.uniq
46
+
39
47
  end
40
48
 
41
49
  def lookup(weak_password, file=nil)
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex-password
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -10,32 +10,33 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
14
- YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjEwNDA2MDk0NjMwWhcN
15
- MjIwNDA2MDk0NjMwWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
- cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC3w4c3
17
- mcQC0soFsLsYL9keB8XUVYx/eS45alEUrFyFLr5HVoWrzm2edCtgEjKs5bFZGdA3
18
- ybagyt0peGb0GPvdfvc5+mHe+AseJ5/6PI0aoxZ1JjQ/j96Bp05y9HXdp6TwklWe
19
- seorFL4mgXb9xEvX32TuJpDK1xBG6FJFbHfcdIXb0nAvx1Mfj4saoz56lYbv/1vU
20
- bI+gjQFaQIZvordRdAEnqa0WXjCE/sJlQcYqym3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YDVR0SBB8wHYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0
29
+ c29uLmV1MA0GCSqGSIb3DQEBCwUAA4IBgQA1/YzJyCRRV3xjjd21TS+HpefpmDMz
30
+ gksju8435o37isV2H2H4sm/saidRnfEtkWH1ifcUbKlHteQmOnSMPN2iwOpLcjL4
31
+ NBNMprsCkB8cZZAtDLRwgly0XJpoHh1uM2M2gZVeK0dJvnUpMWtbbFE3s6XlOtUd
32
+ oTFsX/BinRKuarSqyTl4ws0/dt3h+qoYJ8Bb1xOyWq/kexkClktGO3DriQDiZuau
33
+ bp9ndo495b1UmN5FW2pqUtpgSeD02p/qdmt+P4Md5kWN++wbsFtkozmjPLbUv0V6
34
+ 5tAc4hLqSpKyeWbuOhZcCi+kHehL2KRjIclw1G7OwTmK/Gb6T6AouSQHCnJVbVg3
35
+ uKWmjUqzs/EYKH+apf1pLBlwfnDfQbuhOnpJq0KBZXi+hwg9Untbm/LToA2Vf6vK
36
+ phq1ap3uj5EjiSk3sJoMTknfiQknD2KV2Ixz4D5c7PtY7ySQUMMxS9G2UkQDB+Go
37
+ 00XXjNfWe6IXrHyM3pwjbnNhEoHAdascyM8=
37
38
  -----END CERTIFICATE-----
38
- date: 2021-04-06 00:00:00.000000000 Z
39
+ date: 2023-02-14 00:00:00.000000000 Z
39
40
  dependencies:
40
41
  - !ruby/object:Gem::Dependency
41
42
  name: dynarex
@@ -43,20 +44,20 @@ dependencies:
43
44
  requirements:
44
45
  - - "~>"
45
46
  - !ruby/object:Gem::Version
46
- version: '1.8'
47
+ version: '1.10'
47
48
  - - ">="
48
49
  - !ruby/object:Gem::Version
49
- version: 1.8.27
50
+ version: 1.10.0
50
51
  type: :runtime
51
52
  prerelease: false
52
53
  version_requirements: !ruby/object:Gem::Requirement
53
54
  requirements:
54
55
  - - "~>"
55
56
  - !ruby/object:Gem::Version
56
- version: '1.8'
57
+ version: '1.10'
57
58
  - - ">="
58
59
  - !ruby/object:Gem::Version
59
- version: 1.8.27
60
+ version: 1.10.0
60
61
  description:
61
62
  email: digital.robertson@gmail.com
62
63
  executables: []
@@ -83,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
84
  - !ruby/object:Gem::Version
84
85
  version: '0'
85
86
  requirements: []
86
- rubyforge_project:
87
- rubygems_version: 2.7.10
87
+ rubygems_version: 3.4.4
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: dynarex-password
metadata.gz.sig CHANGED
Binary file