Class: PQCrypto::KEM::EncapsulationResult

Inherits:
Object
  • Object
show all
Defined in:
lib/pq_crypto/kem.rb

Direct Known Subclasses

HybridKEM::EncapsulationResult

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ciphertext, shared_secret) ⇒ EncapsulationResult

Returns a new instance of EncapsulationResult.



193
194
195
196
# File 'lib/pq_crypto/kem.rb', line 193

def initialize(ciphertext, shared_secret)
  @ciphertext = String(ciphertext).b
  @shared_secret = String(shared_secret).b
end

Instance Attribute Details

#ciphertextObject (readonly)

Returns the value of attribute ciphertext.



191
192
193
# File 'lib/pq_crypto/kem.rb', line 191

def ciphertext
  @ciphertext
end

#shared_secretObject (readonly)

Returns the value of attribute shared_secret.



191
192
193
# File 'lib/pq_crypto/kem.rb', line 191

def shared_secret
  @shared_secret
end