Class: PQCrypto::Signature::Keypair
- Inherits:
-
Object
- Object
- PQCrypto::Signature::Keypair
- Defined in:
- lib/pq_crypto/signature.rb
Instance Attribute Summary collapse
-
#public_key ⇒ Object
readonly
Returns the value of attribute public_key.
-
#secret_key ⇒ Object
readonly
Returns the value of attribute secret_key.
Instance Method Summary collapse
- #algorithm ⇒ Object
-
#initialize(public_key, secret_key) ⇒ Keypair
constructor
A new instance of Keypair.
Constructor Details
#initialize(public_key, secret_key) ⇒ Keypair
Returns a new instance of Keypair.
248 249 250 251 252 253 254 255 |
# File 'lib/pq_crypto/signature.rb', line 248 def initialize(public_key, secret_key) @public_key = public_key @secret_key = secret_key unless @public_key.algorithm == @secret_key.algorithm raise InvalidKeyError, "Signature keypair algorithms do not match" end end |
Instance Attribute Details
#public_key ⇒ Object (readonly)
Returns the value of attribute public_key.
246 247 248 |
# File 'lib/pq_crypto/signature.rb', line 246 def public_key @public_key end |
#secret_key ⇒ Object (readonly)
Returns the value of attribute secret_key.
246 247 248 |
# File 'lib/pq_crypto/signature.rb', line 246 def secret_key @secret_key end |
Instance Method Details
#algorithm ⇒ Object
257 258 259 |
# File 'lib/pq_crypto/signature.rb', line 257 def algorithm @public_key.algorithm end |