Class: COSE::Signature

Inherits:
SecurityMessage show all
Defined in:
lib/cose/signature.rb

Constant Summary

Constants inherited from SecurityMessage

COSE::SecurityMessage::ZERO_LENGTH_BIN_STRING

Instance Attribute Summary collapse

Attributes inherited from SecurityMessage

#protected_headers, #unprotected_headers

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SecurityMessage

#algorithm, deserialize, deserialize_headers, from_array, #headers

Constructor Details

#initialize(signature:, **keyword_arguments) ⇒ Signature

Returns a new instance of Signature.



13
14
15
16
17
# File 'lib/cose/signature.rb', line 13

def initialize(signature:, **keyword_arguments)
  super(**keyword_arguments)

  @signature = signature
end

Instance Attribute Details

#signatureObject (readonly)

Returns the value of attribute signature.



7
8
9
# File 'lib/cose/signature.rb', line 7

def signature
  @signature
end

Class Method Details

.keyword_arguments_for_initialize(decoded) ⇒ Object



9
10
11
# File 'lib/cose/signature.rb', line 9

def self.keyword_arguments_for_initialize(decoded)
  { signature: decoded[0] }
end