Top Fields Constructors Methods
org.bouncycastle.pqc.addon

public Class SecretWithEncapsulationImpl

extends Object
implements SecretWithEncapsulation
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.SecretWithEncapsulation
Imports
java.util.concurrent.atomic.AtomicBoolean, javax.security.auth.DestroyFailedException, org.bouncycastle.crypto.SecretWithEncapsulation, org.bouncycastle.util.Arrays

Field Summary

Modifier and TypeField and Description
private final byte[]
private final AtomicBoolean
private final byte[]

Constructor Summary

AccessConstructor and Description
public
SecretWithEncapsulationImpl(byte[] sessionKey, byte[] cipher_text)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public void
public byte[]
getEncapsulation()

Implements org.bouncycastle.crypto.SecretWithEncapsulation.getEncapsulation.

Return the data that carries the secret in its encapsulated form.
public byte[]
getSecret()

Implements org.bouncycastle.crypto.SecretWithEncapsulation.getSecret.

Return the secret associated with the encapsulation.
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cipher_textback to summary
private final byte[] cipher_text
hasBeenDestroyedback to summary
private final AtomicBoolean hasBeenDestroyed
sessionKeyback to summary
private final byte[] sessionKey

Constructor Detail

SecretWithEncapsulationImplback to summary
public SecretWithEncapsulationImpl(byte[] sessionKey, byte[] cipher_text)

Method Detail

checkDestroyedback to summary
pack-priv void checkDestroyed()
destroyback to summary
public void destroy() throws DestroyFailedException
getEncapsulationback to summary
public byte[] getEncapsulation()

Implements org.bouncycastle.crypto.SecretWithEncapsulation.getEncapsulation.

Doc from org.bouncycastle.crypto.SecretWithEncapsulation.getEncapsulation.

Return the data that carries the secret in its encapsulated form.

Returns:byte[]

the encapsulation of the secret.

getSecretback to summary
public byte[] getSecret()

Implements org.bouncycastle.crypto.SecretWithEncapsulation.getSecret.

Doc from org.bouncycastle.crypto.SecretWithEncapsulation.getSecret.

Return the secret associated with the encapsulation.

Returns:byte[]

the secret the encapsulation is for,

isDestroyedback to summary
public boolean isDestroyed()