lazy_rsa 0.3.4 → 0.3.5
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 +8 -2
- 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: d733afe6ae05ae2f7323d8f291a02e6fc87dc862c47fcf98dbbc02d9840633c5
|
4
|
+
data.tar.gz: bf2677279eaacb7e01a3b108ea1d1f207ebfa45bc7fac40659c2fe5f2b7c0ec4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34e13d0e31098bbdb4598f5f66d8b4f4218618f1983f0fec767f70a3414b1a9230cf70adfd1b4a4ecccd3442227ff83699078f8d9fdbcbf88d956320e5de8131
|
7
|
+
data.tar.gz: d1376fe17524a3a631f538d19190fb3888e3392f716e89215185f15588cd89c9b6726f6e9c4cfde01c67a27e66850b7364ded362cca1a8ac435e5f6f0afa9378
|
data/lib/lazy_rsa.rb
CHANGED
@@ -31,9 +31,15 @@ module LazyRsa
|
|
31
31
|
|
32
32
|
def build_key(e: nil, d: nil, n:)
|
33
33
|
data_sequence = OpenSSL::ASN1::Sequence([
|
34
|
+
OpenSSL::ASN1::Integer.new(0),
|
34
35
|
OpenSSL::ASN1::Integer(n),
|
35
|
-
OpenSSL::ASN1::Integer(e),
|
36
|
-
OpenSSL::ASN1::Integer(d),
|
36
|
+
e.nil? ? OpenSSL::ASN1::Integer.new(0) : OpenSSL::ASN1::Integer(e),
|
37
|
+
d.nil? ? OpenSSL::ASN1::Integer.new(0) : OpenSSL::ASN1::Integer(d),
|
38
|
+
OpenSSL::ASN1::Integer.new(0),
|
39
|
+
OpenSSL::ASN1::Integer.new(0),
|
40
|
+
OpenSSL::ASN1::Integer.new(0),
|
41
|
+
OpenSSL::ASN1::Integer.new(0),
|
42
|
+
OpenSSL::ASN1::Integer.new(0),
|
37
43
|
])
|
38
44
|
asn1 = OpenSSL::ASN1::Sequence(data_sequence)
|
39
45
|
OpenSSL::PKey::RSA.new(asn1.to_der)
|