public class BufferedBlockCipherAdapter extends Object implements BlockCipherAdapter
BufferedBlockCipher
.Constructor and Description |
---|
BufferedBlockCipherAdapter(org.bouncycastle.crypto.BufferedBlockCipher 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.
|
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 BufferedBlockCipherAdapter(org.bouncycastle.crypto.BufferedBlockCipher delegate)
delegate
- Adapted cipher.public int getOutputSize(int len)
getOutputSize
in interface BlockCipherAdapter
len
- Length of input buffer.public void init(boolean forEncryption, org.bouncycastle.crypto.CipherParameters params)
init
in interface CipherAdapter
forEncryption
- True for encryption mode, false for decryption mode.params
- Cipher initialization parameters.public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff)
processBytes
in interface CipherAdapter
in
- 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.public int doFinal(byte[] out, int outOff)
doFinal
in interface BlockCipherAdapter
out
- Output buffer to receive final processing output.outOff
- Offset into output buffer where processed data should
start.public void reset()
reset
in interface CipherAdapter
Copyright © 2016 JBoss by Red Hat. All rights reserved.