Class: TTTLS13::Message::EndOfEarlyData
- Inherits:
-
Object
- Object
- TTTLS13::Message::EndOfEarlyData
- Defined in:
- lib/tttls1.3/message/end_of_early_data.rb
Instance Attribute Summary collapse
-
#msg_type ⇒ Object
readonly
Returns the value of attribute msg_type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ EndOfEarlyData
constructor
A new instance of EndOfEarlyData.
- #serialize ⇒ String
Constructor Details
#initialize ⇒ EndOfEarlyData
Returns a new instance of EndOfEarlyData.
10 11 12 |
# File 'lib/tttls1.3/message/end_of_early_data.rb', line 10 def initialize @msg_type = HandshakeType::END_OF_EARLY_DATA end |
Instance Attribute Details
#msg_type ⇒ Object (readonly)
Returns the value of attribute msg_type.
8 9 10 |
# File 'lib/tttls1.3/message/end_of_early_data.rb', line 8 def msg_type @msg_type end |
Class Method Details
.deserialize(binary) ⇒ TTTLS13::Message::EndOfEarlyData
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/tttls1.3/message/end_of_early_data.rb', line 24 def self.deserialize(binary) raise Error::ErrorAlerts, :internal_error if binary.nil? raise Error::ErrorAlerts, :decode_error unless binary.length == 4 raise Error::ErrorAlerts, :unexpected_message \ unless binary[0] == HandshakeType::END_OF_EARLY_DATA raise Error::ErrorAlerts, :decode_error \ unless binary == "\x05\x00\x00\x00" EndOfEarlyData.new end |
Instance Method Details
#serialize ⇒ String
15 16 17 |
# File 'lib/tttls1.3/message/end_of_early_data.rb', line 15 def serialize @msg_type + ''.prefix_uint24_length end |