Top Fields Constructors Methods
org.bouncycastle.pqc.crypto.util

public Class SecretWithEncapsulationImpl

extends Object
implements SecretWithEncapsulation
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.SecretWithEncapsulation, javax.security.auth.Destroyable
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
destroy()

Overrides default javax.security.auth.Destroyable.destroy.

Destroy this Object.
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
isDestroyed()

Overrides default javax.security.auth.Destroyable.isDestroyed.

Determine if this Object has been destroyed.
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

Overrides default javax.security.auth.Destroyable.destroy.

Doc from javax.security.auth.Destroyable.destroy.

Destroy this Object.

Sensitive information associated with this Object is destroyed or cleared. Subsequent calls to certain methods on this Object will result in an IllegalStateException being thrown.

Exceptions
DestroyFailedException:
if the destroy operation fails.
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()

Overrides default javax.security.auth.Destroyable.isDestroyed.

Doc from javax.security.auth.Destroyable.isDestroyed.

Determine if this Object has been destroyed.

Returns:boolean

true if this Object has been destroyed, false otherwise.