Class: Ccrypto::Java::CrystalKyberKEM
- Inherits:
-
Object
- Object
- Ccrypto::Java::CrystalKyberKEM
- Includes:
- DataConversion, TR::CondUtils
- Defined in:
- lib/ccrypto/java/engines/crystal_kyber_engine.rb
Overview
class CrystalKyberPrivateKey
Instance Method Summary collapse
- #for_cipher ⇒ Object
- #for_recipient ⇒ Object
-
#initialize(kem) ⇒ CrystalKyberKEM
constructor
A new instance of CrystalKyberKEM.
- #native ⇒ Object
Methods included from DataConversion
#from_b64, #from_b64_mime, #from_hex, included, #logger, #to_b64, #to_b64_mime, #to_bin, #to_hex, #to_java_bytes, #to_str
Constructor Details
#initialize(kem) ⇒ CrystalKyberKEM
Returns a new instance of CrystalKyberKEM.
130 131 132 133 |
# File 'lib/ccrypto/java/engines/crystal_kyber_engine.rb', line 130 def initialize(kem) @kem = kem raise KeypairEngineException, "KEM cannot be empty" if is_empty?(@kem) end |
Instance Method Details
#for_cipher ⇒ Object
139 140 141 |
# File 'lib/ccrypto/java/engines/crystal_kyber_engine.rb', line 139 def for_cipher @kem.getSecret() end |
#for_recipient ⇒ Object
135 136 137 |
# File 'lib/ccrypto/java/engines/crystal_kyber_engine.rb', line 135 def for_recipient @kem.getEncapsulation() end |
#native ⇒ Object
143 144 145 |
# File 'lib/ccrypto/java/engines/crystal_kyber_engine.rb', line 143 def native @kem end |