Class: Nis::Keypair
- Inherits:
-
Object
- Object
- Nis::Keypair
- Defined in:
- lib/nis/keypair.rb
Instance Attribute Summary collapse
-
#private ⇒ Object
readonly
Returns the value of attribute private.
-
#public ⇒ Object
readonly
Returns the value of attribute public.
Instance Method Summary collapse
-
#initialize(private_key, public_key: nil) ⇒ Keypair
constructor
A new instance of Keypair.
-
#sign(data) ⇒ String
Signed hex string.
Constructor Details
#initialize(private_key, public_key: nil) ⇒ Keypair
Returns a new instance of Keypair.
7 8 9 10 |
# File 'lib/nis/keypair.rb', line 7 def initialize(private_key, public_key: nil) @private = private_key @public = public_key || calc_public_key end |
Instance Attribute Details
#private ⇒ Object (readonly)
Returns the value of attribute private.
3 4 5 |
# File 'lib/nis/keypair.rb', line 3 def private @private end |
#public ⇒ Object (readonly)
Returns the value of attribute public.
3 4 5 |
# File 'lib/nis/keypair.rb', line 3 def public @public end |