Package org.bouncycastle.pqc.crypto.util
Class SecretWithEncapsulationImpl
- java.lang.Object
-
- org.bouncycastle.pqc.crypto.util.SecretWithEncapsulationImpl
-
- All Implemented Interfaces:
javax.security.auth.Destroyable,SecretWithEncapsulation
public class SecretWithEncapsulationImpl extends java.lang.Object implements SecretWithEncapsulation
-
-
Constructor Summary
Constructors Constructor Description SecretWithEncapsulationImpl(byte[] sessionKey, byte[] cipher_text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()byte[]getEncapsulation()Return the data that carries the secret in its encapsulated form.byte[]getSecret()Return the secret associated with the encapsulation.booleanisDestroyed()
-
-
-
Method Detail
-
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
public void destroy() throws javax.security.auth.DestroyFailedException- Specified by:
destroyin interfacejavax.security.auth.Destroyable- Throws:
javax.security.auth.DestroyFailedException
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfacejavax.security.auth.Destroyable
-
-