Class: COSE::Algorithm::ECDSA
- Inherits:
-
SignatureAlgorithm
- Object
- Base
- SignatureAlgorithm
- COSE::Algorithm::ECDSA
- Defined in:
- lib/cose/algorithm/ecdsa.rb
Instance Attribute Summary collapse
-
#curve ⇒ Object
readonly
Returns the value of attribute curve.
-
#hash_function ⇒ Object
readonly
Returns the value of attribute hash_function.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(*args, hash_function:, curve_name:) ⇒ ECDSA
constructor
A new instance of ECDSA.
Methods inherited from SignatureAlgorithm
Constructor Details
#initialize(*args, hash_function:, curve_name:) ⇒ ECDSA
Returns a new instance of ECDSA.
15 16 17 18 19 20 |
# File 'lib/cose/algorithm/ecdsa.rb', line 15 def initialize(*args, hash_function:, curve_name:) super(*args) @hash_function = hash_function @curve = COSE::Key::Curve.by_name(curve_name) || raise("Couldn't find curve with name='#{curve_name}'") end |
Instance Attribute Details
#curve ⇒ Object (readonly)
Returns the value of attribute curve.
13 14 15 |
# File 'lib/cose/algorithm/ecdsa.rb', line 13 def curve @curve end |
#hash_function ⇒ Object (readonly)
Returns the value of attribute hash_function.
13 14 15 |
# File 'lib/cose/algorithm/ecdsa.rb', line 13 def hash_function @hash_function end |