Package org.bouncycastle.pqc.crypto.util
Class SecretWithEncapsulationImpl
java.lang.Object
org.bouncycastle.pqc.crypto.util.SecretWithEncapsulationImpl
- All Implemented Interfaces:
Destroyable,SecretWithEncapsulation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidvoiddestroy()byte[]Return the data that carries the secret in its encapsulated form.byte[]Return the secret associated with the encapsulation.boolean
-
Constructor Details
-
SecretWithEncapsulationImpl
public SecretWithEncapsulationImpl(byte[] sessionKey, byte[] cipher_text)
-
-
Method Details
-
getSecret
public byte[] getSecret()Description copied from interface:SecretWithEncapsulationReturn the secret associated with the encapsulation.- Specified by:
getSecretin interfaceSecretWithEncapsulation- Returns:
- the secret the encapsulation is for.
-
getEncapsulation
public byte[] getEncapsulation()Description copied from interface:SecretWithEncapsulationReturn the data that carries the secret in its encapsulated form.- Specified by:
getEncapsulationin interfaceSecretWithEncapsulation- Returns:
- the encapsulation of the secret.
-
destroy
- Specified by:
destroyin interfaceDestroyable- Throws:
DestroyFailedException
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-
checkDestroyed
void checkDestroyed()
-