Class: PQCrypto::HybridKEM::PublicKey
- Inherits:
-
KEM::PublicKey
- Object
- KEM::PublicKey
- PQCrypto::HybridKEM::PublicKey
- Defined in:
- lib/pq_crypto/hybrid_kem.rb
Instance Attribute Summary
Attributes inherited from KEM::PublicKey
Instance Method Summary collapse
Methods inherited from KEM::PublicKey
#==, #encapsulate_to_bytes, #hash, #initialize, #to_bytes, #to_pqc_container_der, #to_pqc_container_pem
Constructor Details
This class inherits a constructor from PQCrypto::KEM::PublicKey
Instance Method Details
#encapsulate ⇒ Object
76 77 78 79 80 81 |
# File 'lib/pq_crypto/hybrid_kem.rb', line 76 def encapsulate ciphertext, shared_secret = PQCrypto.__send__(:native_hybrid_kem_encapsulate, @bytes) EncapsulationResult.new(ciphertext, shared_secret) rescue ArgumentError => e raise InvalidKeyError, e. end |