Class: PQCrypto::KEM::EncapsulationResult
- Inherits:
-
Object
- Object
- PQCrypto::KEM::EncapsulationResult
- Defined in:
- lib/pq_crypto/kem.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#ciphertext ⇒ Object
readonly
Returns the value of attribute ciphertext.
-
#shared_secret ⇒ Object
readonly
Returns the value of attribute shared_secret.
Instance Method Summary collapse
-
#initialize(ciphertext, shared_secret) ⇒ EncapsulationResult
constructor
A new instance of EncapsulationResult.
- #inspect ⇒ Object
Constructor Details
#initialize(ciphertext, shared_secret) ⇒ EncapsulationResult
Returns a new instance of EncapsulationResult.
331 332 333 334 |
# File 'lib/pq_crypto/kem.rb', line 331 def initialize(ciphertext, shared_secret) @ciphertext = Internal.binary_string(ciphertext) @shared_secret = Internal.binary_string(shared_secret) end |
Instance Attribute Details
#ciphertext ⇒ Object (readonly)
Returns the value of attribute ciphertext.
329 330 331 |
# File 'lib/pq_crypto/kem.rb', line 329 def ciphertext @ciphertext end |
#shared_secret ⇒ Object (readonly)
Returns the value of attribute shared_secret.
329 330 331 |
# File 'lib/pq_crypto/kem.rb', line 329 def shared_secret @shared_secret end |
Instance Method Details
#inspect ⇒ Object
336 337 338 |
# File 'lib/pq_crypto/kem.rb', line 336 def inspect "#<#{self.class}:0x#{object_id.to_s(16)} ciphertext_bytes=#{@ciphertext.bytesize} shared_secret_bytes=#{@shared_secret.bytesize}>" end |