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.
205 206 207 208 |
# File 'lib/pq_crypto/kem.rb', line 205 def initialize(ciphertext, shared_secret) @ciphertext = String(ciphertext).b @shared_secret = String(shared_secret).b end |
Instance Attribute Details
#ciphertext ⇒ Object (readonly)
Returns the value of attribute ciphertext.
203 204 205 |
# File 'lib/pq_crypto/kem.rb', line 203 def ciphertext @ciphertext end |
#shared_secret ⇒ Object (readonly)
Returns the value of attribute shared_secret.
203 204 205 |
# File 'lib/pq_crypto/kem.rb', line 203 def shared_secret @shared_secret end |
Instance Method Details
#inspect ⇒ Object
210 211 212 |
# File 'lib/pq_crypto/kem.rb', line 210 def inspect "#<#{self.class}:0x#{object_id.to_s(16)} ciphertext_bytes=#{@ciphertext.bytesize} shared_secret_bytes=#{@shared_secret.bytesize}>" end |