| Modifier and Type | Field and Description |
|---|---|
static Map<String,List<Integer>> |
SUPPORTED_TRANSFORMATIONS
A map of transformations and lists of available key sizes that every
implementation of the Java platform is required to support.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Ciphers()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
doFinal(Cipher cipher,
InputStream input,
OutputStream output,
byte[] inbuf,
long length)
Updates and finishes a multi-part encryption or description operation.
|
static long |
doFinal(Cipher cipher,
ReadableByteChannel input,
WritableByteChannel output,
ByteBuffer inbuf,
long length)
Updates and finishes a multi-part encryption or description.
|
public static long doFinal(Cipher cipher, InputStream input, OutputStream output, byte[] inbuf, long length) throws IOException, IllegalBlockSizeException, BadPaddingException
cipher - the cipherinput - the inputoutput - the outputinbuf - the input bufferlength - the maximum number of bytes to process; any negative for
all available bytes.IOException - if an I/O error occurs.IllegalBlockSizeException - if this cipher is a block cipher, no
padding has been requested (only in encryption mode), and the total input
length of the data processed by this cipher is not a multiple of block
size; or if this encryption algorithm is unable to process the input data
provided. Description copied from
Cipher.doFinal(byte[], int).BadPaddingException - if this cipher is in decryption mode, and
(un)padding has been requested, but the decrypted data is not bounded by
the appropriate padding bytes. Description copied from
Cipher.doFinal(byte[], int).Cipher.update(byte[], int, int, byte[], int),
Cipher.doFinal(byte[], int)public static long doFinal(Cipher cipher, ReadableByteChannel input, WritableByteChannel output, ByteBuffer inbuf, long length) throws IOException, IllegalBlockSizeException, BadPaddingException
cipher - the cipherinput - the inputoutput - the outputinbuf - the input bufferlength - the maximum number of bytes to process; any negative for
all available bytes.IOException - if an I/O error occursIllegalBlockSizeException - if this cipher is a block cipher, no
padding has been requested (only in encryption mode), and the total input
length of the data processed by this cipher is not a multiple of block
size; or if this encryption algorithm is unable to process the input data
provided. Description copied from
Cipher.doFinal(java.nio.ByteBuffer, java.nio.ByteBuffer).BadPaddingException - if there is insufficient space in the output
buffer. Description copied from
Cipher.doFinal(java.nio.ByteBuffer, java.nio.ByteBuffer).Cipher.update(java.nio.ByteBuffer, java.nio.ByteBuffer),
Cipher.doFinal(java.nio.ByteBuffer, java.nio.ByteBuffer)Copyright © 2011-2013. All Rights Reserved.