Class: TTTLS13::Message::Extension::ECHEncryptedExtensions
- Inherits:
-
Object
- Object
- TTTLS13::Message::Extension::ECHEncryptedExtensions
- Defined in:
- lib/tttls1.3/message/extension/ech.rb
Overview
NOTE:
struct {
ECHConfigList retry_configs;
} ECHEncryptedExtensions;
Instance Attribute Summary collapse
-
#extension_type ⇒ Object
Returns the value of attribute extension_type.
-
#retry_configs ⇒ Object
Returns the value of attribute retry_configs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(retry_configs) ⇒ ECHEncryptedExtensions
constructor
A new instance of ECHEncryptedExtensions.
- #serialize ⇒ String
Constructor Details
#initialize(retry_configs) ⇒ ECHEncryptedExtensions
Returns a new instance of ECHEncryptedExtensions.
179 180 181 182 |
# File 'lib/tttls1.3/message/extension/ech.rb', line 179 def initialize(retry_configs) @extension_type = ExtensionType::ENCRYPTED_CLIENT_HELLO @retry_configs = retry_configs end |
Instance Attribute Details
#extension_type ⇒ Object
Returns the value of attribute extension_type.
175 176 177 |
# File 'lib/tttls1.3/message/extension/ech.rb', line 175 def extension_type @extension_type end |
#retry_configs ⇒ Object
Returns the value of attribute retry_configs.
176 177 178 |
# File 'lib/tttls1.3/message/extension/ech.rb', line 176 def retry_configs @retry_configs end |
Class Method Details
.deserialize(binary) ⇒ TTTLS13::Message::Extensions::ECHEncryptedExtensions
197 198 199 200 201 202 203 204 205 |
# File 'lib/tttls1.3/message/extension/ech.rb', line 197 def self.deserialize(binary) raise Error::ErrorAlerts, :decode_error \ if binary.nil? || binary.length != binary.slice(0, 2).unpack1('n') + 2 ECHEncryptedExtensions.new( ECHConfig.decode_vectors(binary.slice(2..)) ) end |
Instance Method Details
#serialize ⇒ String
185 186 187 188 189 190 |
# File 'lib/tttls1.3/message/extension/ech.rb', line 185 def serialize @extension_type + @retry_configs.map(&:encode) .join .prefix_uint16_length .prefix_uint16_length end |