Modifier and Type | Method and Description |
---|---|
int |
decrypt(byte[] input,
int offset,
int length,
byte[] output,
int outOffset)
Decrypts the input
|
int |
encrypt(byte[] input,
int offset,
int length,
byte[] output,
int outOffset)
Encrypts the input
|
int |
getBlockSize()
Returns the size of the block of the encryption or decryption
|
int |
getDecryptOutputSize(int inputSize)
Returns the maximum size the output buffer needs to be
|
int |
getEncryptOutputSize(int inputSize)
Returns the maximum size the output buffer needs to be
|
int encrypt(byte[] input, int offset, int length, byte[] output, int outOffset) throws javax.crypto.ShortBufferException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException
input
- The input to be encryptedoffset
- The offset into the input buffer where the input startslength
- The length of the inputoutput
- The output bufferoutOffset
- The offset into the output buffer where to store the outputjavax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.ShortBufferException
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
int decrypt(byte[] input, int offset, int length, byte[] output, int outOffset) throws javax.crypto.ShortBufferException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException
input
- The input to be decryptedoffset
- The offset into the input buffer where the input startslength
- The length of the inputoutput
- The output bufferoutOffset
- The offset into the output buffer where to store the outputjavax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.ShortBufferException
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
int getEncryptOutputSize(int inputSize)
inputSize
- The size of the input to be encryptedjava.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
int getDecryptOutputSize(int inputSize)
inputSize
- The size of the input to be decryptedint getBlockSize()