public class AEADBlockCipherAdapter extends Object implements BlockCipherAdapter
AEADBlockCipherAdapter.| Constructor and Description |
|---|
AEADBlockCipherAdapter(org.bouncycastle.crypto.modes.AEADBlockCipher delegate)
Creates a new instance that delegates to the given cipher.
|
| Modifier and Type | Method and Description |
|---|---|
int |
doFinal(byte[] out,
int outOff)
Finish the encryption/decryption operation (e.g. apply padding).
|
int |
getOutputSize(int len)
Gets the size of the output buffer required to hold the output of an input buffer of the given size.
|
void |
init(boolean forEncryption,
org.bouncycastle.crypto.CipherParameters params)
Initialize the underlying cipher.
|
int |
processBytes(byte[] in,
int inOff,
int len,
byte[] out,
int outOff)
Process an array of bytes, producing output if necessary.
|
void |
reset()
Reset the cipher.
|
public AEADBlockCipherAdapter(org.bouncycastle.crypto.modes.AEADBlockCipher delegate)
delegate - Adapted cipher.public int getOutputSize(int len)
BlockCipherAdaptergetOutputSize in interface BlockCipherAdapterlen - Length of input buffer.public void init(boolean forEncryption,
org.bouncycastle.crypto.CipherParameters params)
throws CryptoException
CipherAdapterinit in interface CipherAdapterforEncryption - True for encryption mode, false for decryption mode.params - Cipher initialization parameters.CryptoException - on underlying cipher initialization errors.public int processBytes(byte[] in,
int inOff,
int len,
byte[] out,
int outOff)
throws CryptoException
CipherAdapterprocessBytes in interface CipherAdapterin - Input data.inOff - Offset at which the input data starts.len - The number of bytes in the input data to process.out - Array to receive any data produced by cipher.outOff - Offset into output array.CryptoException - on underlying cipher data handling errors.public int doFinal(byte[] out,
int outOff)
throws CryptoException
BlockCipherAdapterdoFinal in interface BlockCipherAdapterout - Output buffer to receive final processing output.outOff - Offset into output buffer where processed data should start.CryptoException - on underlying cipher finalization errors.public void reset()
CipherAdapterreset in interface CipherAdapterCopyright © 2003-2024 Virginia Tech. All Rights Reserved.