Class: Melos::Struct::MLSMessage
- Defined in:
- lib/melos/struct/structs.rb
Constant Summary collapse
- STRUCT =
[ [:version, :uint16], #mls10 = 1 [:wire_format, :uint16], [:public_message, :select, ->(ctx){ctx[:wire_format] == Melos::Constants::WireFormat::MLS_PUBLIC_MESSAGE}, :class, Melos::Struct::PublicMessage], [:private_message, :select, ->(ctx){ctx[:wire_format] == Melos::Constants::WireFormat::MLS_PRIVATE_MESSAGE}, :class, Melos::Struct::PrivateMessage], [:welcome, :select, ->(ctx){ctx[:wire_format] == Melos::Constants::WireFormat::MLS_WELCOME}, :class, Melos::Struct::Welcome], [:group_info, :select, ->(ctx){ctx[:wire_format] == Melos::Constants::WireFormat::MLS_GROUP_INFO}, :class, Melos::Struct::GroupInfo], [:key_package, :select, ->(ctx){ctx[:wire_format] == Melos::Constants::WireFormat::MLS_KEY_PACKAGE}, :class, Melos::Struct::KeyPackage] ]
Instance Attribute Summary collapse
-
#group_info ⇒ Object
Returns the value of attribute group_info.
-
#key_package ⇒ Object
Returns the value of attribute key_package.
-
#private_message ⇒ Object
Returns the value of attribute private_message.
-
#public_message ⇒ Object
Returns the value of attribute public_message.
-
#version ⇒ Object
Returns the value of attribute version.
-
#welcome ⇒ Object
Returns the value of attribute welcome.
-
#wire_format ⇒ Object
Returns the value of attribute wire_format.
Instance Method Summary collapse
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
#group_info ⇒ Object
Returns the value of attribute group_info.
1004 1005 1006 |
# File 'lib/melos/struct/structs.rb', line 1004 def group_info @group_info end |
#key_package ⇒ Object
Returns the value of attribute key_package.
1004 1005 1006 |
# File 'lib/melos/struct/structs.rb', line 1004 def key_package @key_package end |
#private_message ⇒ Object
Returns the value of attribute private_message.
1004 1005 1006 |
# File 'lib/melos/struct/structs.rb', line 1004 def @private_message end |
#public_message ⇒ Object
Returns the value of attribute public_message.
1004 1005 1006 |
# File 'lib/melos/struct/structs.rb', line 1004 def @public_message end |
#version ⇒ Object
Returns the value of attribute version.
1004 1005 1006 |
# File 'lib/melos/struct/structs.rb', line 1004 def version @version end |
#welcome ⇒ Object
Returns the value of attribute welcome.
1004 1005 1006 |
# File 'lib/melos/struct/structs.rb', line 1004 def welcome @welcome end |
#wire_format ⇒ Object
Returns the value of attribute wire_format.
1004 1005 1006 |
# File 'lib/melos/struct/structs.rb', line 1004 def wire_format @wire_format end |
Instance Method Details
#verify(suite, signer_public_key, group_context) ⇒ Object
1015 1016 1017 1018 1019 |
# File 'lib/melos/struct/structs.rb', line 1015 def verify(suite, signer_public_key, group_context) if wire_format == Melos::Constants::WireFormat::MLS_PUBLIC_MESSAGE .verify(suite, signer_public_key, version, wire_format, group_context) end end |