Class: Melos::Struct::GroupInfo
- Defined in:
- lib/melos/struct/structs.rb
Overview
12.4.3
Constant Summary collapse
- STRUCT =
[ [:group_context, :class, Melos::Struct::GroupContext], [:extensions, :classes, Melos::Struct::Extension], [:confirmation_tag, :vec], # MAC = opaque <V> [:signer, :uint32], [:signature, :vec] ]
Instance Attribute Summary collapse
-
#confirmation_tag ⇒ Object
readonly
Returns the value of attribute confirmation_tag.
-
#extensions ⇒ Object
readonly
Returns the value of attribute extensions.
-
#group_context ⇒ Object
readonly
Returns the value of attribute group_context.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
-
#signer ⇒ Object
readonly
Returns the value of attribute signer.
Instance Method Summary collapse
- #group_info_tbs ⇒ Object
- #sign(suite, signer_private) ⇒ Object
- #verify(suite, signer_public_key) ⇒ Object
Methods inherited from Base
#deserialize_select_elem_with_context, #initialize, #raw
Constructor Details
This class inherits a constructor from Melos::Struct::Base
Instance Attribute Details
#confirmation_tag ⇒ Object (readonly)
Returns the value of attribute confirmation_tag.
479 480 481 |
# File 'lib/melos/struct/structs.rb', line 479 def confirmation_tag @confirmation_tag end |
#extensions ⇒ Object (readonly)
Returns the value of attribute extensions.
479 480 481 |
# File 'lib/melos/struct/structs.rb', line 479 def extensions @extensions end |
#group_context ⇒ Object (readonly)
Returns the value of attribute group_context.
479 480 481 |
# File 'lib/melos/struct/structs.rb', line 479 def group_context @group_context end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
479 480 481 |
# File 'lib/melos/struct/structs.rb', line 479 def signature @signature end |
#signer ⇒ Object (readonly)
Returns the value of attribute signer.
479 480 481 |
# File 'lib/melos/struct/structs.rb', line 479 def signer @signer end |
Instance Method Details
#group_info_tbs ⇒ Object
488 489 490 491 492 493 494 495 |
# File 'lib/melos/struct/structs.rb', line 488 def group_info_tbs Melos::Struct::GroupInfoTBS.create( group_context:, extensions:, confirmation_tag:, signer: ) end |
#sign(suite, signer_private) ⇒ Object
497 498 499 |
# File 'lib/melos/struct/structs.rb', line 497 def sign(suite, signer_private) Melos::Crypto.sign_with_label(suite, signer_private_key, "GroupInfoTBS", group_info_tbs.raw) end |
#verify(suite, signer_public_key) ⇒ Object
501 502 503 |
# File 'lib/melos/struct/structs.rb', line 501 def verify(suite, signer_public_key) Melos::Crypto.verify_with_label(suite, signer_public_key, "GroupInfoTBS", group_info_tbs.raw, signature) end |