public interface Cipher extends CipherInformation
Modifier and Type | Interface and Description |
---|---|
static class |
Cipher.Mode |
static class |
Cipher.Utils
Utility class to help using
Cipher s |
Modifier and Type | Method and Description |
---|---|
void |
init(Cipher.Mode mode,
byte[] key,
byte[] iv)
Initialize the cipher for encryption or decryption with
the given key and initialization vector
|
void |
update(byte[] input)
Performs in-place encryption or decryption on the given data.
|
void |
update(byte[] input,
int inputOffset,
int inputLen)
Performs in-place encryption or decryption on the given data.
|
getAlgorithm, getBlockSize, getIVSize, getTransformation
void init(Cipher.Mode mode, byte[] key, byte[] iv) throws Exception
mode
- Encrypt/Decrypt initializationkey
- Key bytesiv
- Initialization vector bytesException
- If failed to initializevoid update(byte[] input) throws Exception
input
- The input/output bytesException
- If failed to executeupdate(byte[], int, int)
void update(byte[] input, int inputOffset, int inputLen) throws Exception
input
- The input/output bytesinputOffset
- The offset of the data in the data bufferinputLen
- The number of bytes to update - starting at the given offsetException
- If failed to executeCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.