Class: COSE::Sign1
- Inherits:
-
SecurityMessage
- Object
- SecurityMessage
- COSE::Sign1
- Defined in:
- lib/cose/sign1.rb
Constant Summary collapse
- CONTEXT =
"Signature1"
Constants inherited from SecurityMessage
COSE::SecurityMessage::ZERO_LENGTH_BIN_STRING
Instance Attribute Summary collapse
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
Attributes inherited from SecurityMessage
#protected_headers, #unprotected_headers
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(payload:, signature:, **keyword_arguments) ⇒ Sign1
constructor
A new instance of Sign1.
- #verify(key, external_aad = nil) ⇒ Object
Methods inherited from SecurityMessage
#algorithm, deserialize, deserialize_headers, from_array, #headers
Constructor Details
#initialize(payload:, signature:, **keyword_arguments) ⇒ Sign1
Returns a new instance of Sign1.
21 22 23 24 25 26 |
# File 'lib/cose/sign1.rb', line 21 def initialize(payload:, signature:, **keyword_arguments) super(**keyword_arguments) @payload = payload @signature = signature end |
Instance Attribute Details
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
11 12 13 |
# File 'lib/cose/sign1.rb', line 11 def payload @payload end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
11 12 13 |
# File 'lib/cose/sign1.rb', line 11 def signature @signature end |
Class Method Details
.keyword_arguments_for_initialize(decoded) ⇒ Object
13 14 15 |
# File 'lib/cose/sign1.rb', line 13 def self.keyword_arguments_for_initialize(decoded) { payload: decoded[0], signature: decoded[1] } end |
.tag ⇒ Object
17 18 19 |
# File 'lib/cose/sign1.rb', line 17 def self.tag 18 end |