Class: Prevoty::RSAPrivateKey
- Inherits:
-
RSAPublicKey
- Object
- RSAPublicKey
- Prevoty::RSAPrivateKey
- Defined in:
- lib/prevoty/responses/rsa_private_key.rb
Instance Attribute Summary collapse
-
#d ⇒ Object
readonly
Returns the value of attribute d.
-
#precomputed ⇒ Object
readonly
Returns the value of attribute precomputed.
-
#primes ⇒ Object
readonly
Returns the value of attribute primes.
Attributes inherited from RSAPublicKey
Instance Method Summary collapse
-
#initialize(data) ⇒ RSAPrivateKey
constructor
A new instance of RSAPrivateKey.
- #to_json(*a) ⇒ Object
Constructor Details
#initialize(data) ⇒ RSAPrivateKey
Returns a new instance of RSAPrivateKey.
5 6 7 8 9 10 |
# File 'lib/prevoty/responses/rsa_private_key.rb', line 5 def initialize(data) super(data) @d = data["D"] @primes = data["Primes"] @precomputed = data["Precomputed"] end |
Instance Attribute Details
#d ⇒ Object (readonly)
Returns the value of attribute d.
3 4 5 |
# File 'lib/prevoty/responses/rsa_private_key.rb', line 3 def d @d end |
#precomputed ⇒ Object (readonly)
Returns the value of attribute precomputed.
3 4 5 |
# File 'lib/prevoty/responses/rsa_private_key.rb', line 3 def precomputed @precomputed end |
#primes ⇒ Object (readonly)
Returns the value of attribute primes.
3 4 5 |
# File 'lib/prevoty/responses/rsa_private_key.rb', line 3 def primes @primes end |
Instance Method Details
#to_json(*a) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/prevoty/responses/rsa_private_key.rb', line 12 def to_json(*a) { E: @e, N: @n, D: @d, Primes: @primes, Precomputed: @precomputed }.to_json end |