Class: ECHConfig::ECHConfigContents::HpkeKeyConfig::HpkePublicKey
- Inherits:
-
Object
- Object
- ECHConfig::ECHConfigContents::HpkeKeyConfig::HpkePublicKey
- Defined in:
- lib/ech_config/ech_config_contents/hpke_key_config/hpke_public_key.rb,
sig/generated/ech_config/ech_config_contents/hpke_key_config/hpke_public_key.rbs
Overview
rbs_inline: enabled
Instance Attribute Summary collapse
-
#opaque ⇒ Object
readonly
Returns the value of attribute opaque.
Class Method Summary collapse
Instance Method Summary collapse
- #encode ⇒ String
-
#initialize(opaque) ⇒ HpkePublicKey
constructor
A new instance of HpkePublicKey.
Constructor Details
#initialize(opaque) ⇒ HpkePublicKey
Returns a new instance of HpkePublicKey.
10 11 12 |
# File 'lib/ech_config/ech_config_contents/hpke_key_config/hpke_public_key.rb', line 10 def initialize(opaque) @opaque = opaque end |
Instance Attribute Details
#opaque ⇒ Object (readonly)
Returns the value of attribute opaque.
6 7 8 |
# File 'lib/ech_config/ech_config_contents/hpke_key_config/hpke_public_key.rb', line 6 def opaque @opaque end |
Class Method Details
.decode(octet) ⇒ ECHConfig::ECHConfigContents::HpkeKeyConfig::HpkePublicKey
21 22 23 |
# File 'lib/ech_config/ech_config_contents/hpke_key_config/hpke_public_key.rb', line 21 def self.decode(octet) new(octet) end |
Instance Method Details
#encode ⇒ String
15 16 17 |
# File 'lib/ech_config/ech_config_contents/hpke_key_config/hpke_public_key.rb', line 15 def encode @opaque.then { |s| [s.length].pack('n') + s } end |