lazy_rsa 0.3.8 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lazy_rsa.rb +2 -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: a924505cbe7e3c95f70e8d8868b48ac7053d9316d8b0f73e833e57b312e06549
|
4
|
+
data.tar.gz: 825fbf69a799f7f14f031522b43b686817058e42bc014a5c687c887f6e9e428c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 473cf3612a65657e14dd2b0f09eabe4922c95829614e458a5e4c61e9f35e3477d7552dc82a0a412b4d6d0504fb25e06657f512a71a3f3e567ee3d03febb84d23
|
7
|
+
data.tar.gz: 6cff23b43e1176c7e1229203809362447a4e06e3a7fbbeb8118f6c5ebefa417e1a26b124e68c400e16f01529437078df0801b7cf91a0b4b8ec3b9c766f0d6b54
|
data/lib/lazy_rsa.rb
CHANGED
@@ -19,6 +19,7 @@ module LazyRsa
|
|
19
19
|
p = 0
|
20
20
|
q = OpenSSL::BN.generate_prime(512)
|
21
21
|
phi = 0
|
22
|
+
e = 0
|
22
23
|
loop do
|
23
24
|
p = OpenSSL::BN.generate_prime(512)
|
24
25
|
phi = (p - 1) * (q - 1)
|
@@ -50,7 +51,7 @@ module LazyRsa
|
|
50
51
|
private
|
51
52
|
|
52
53
|
def read_key(key)
|
53
|
-
KeyParams.new(**key.params)
|
54
|
+
KeyParams.new(**key.params.slice("e", "d", "n"))
|
54
55
|
end
|
55
56
|
|
56
57
|
def text_to_integer(text)
|