Implementation of the identity cipher.
Method from javax.crypto.NullCipherImpl Detail: |
protected byte[] engineDoFinal(byte[] input,
int inputOffset,
int inputLen) {
return engineUpdate(input, inputOffset, inputLen);
}
|
protected int engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) throws ShortBufferException {
return engineUpdate(input, inputOffset, inputLen, output, outputOffset);
}
|
protected int engineGetBlockSize() {
return 1;
}
|
protected byte[] engineGetIV() {
return null;
}
|
protected int engineGetOutputSize(int inputLen) {
return inputLen;
}
|
protected AlgorithmParameters engineGetParameters() {
return null;
}
|
protected void engineInit(int mode,
Key key,
SecureRandom random) {
}
|
protected void engineInit(int mode,
Key key,
AlgorithmParameterSpec spec,
SecureRandom random) {
}
|
protected void engineInit(int mode,
Key key,
AlgorithmParameters params,
SecureRandom random) {
}
|
protected void engineSetMode(String mode) {
}
|
protected void engineSetPadding(String padding) {
}
|
protected byte[] engineUpdate(byte[] input,
int inputOffset,
int inputLen) {
if (input == null)
return new byte[0];
if (inputOffset < 0 || inputLen < 0 || inputOffset + inputLen > input.length)
throw new ArrayIndexOutOfBoundsException();
byte[] output = new byte[inputLen];
System.arraycopy(input, inputOffset, output, 0, inputLen);
return output;
}
|
protected int engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) throws ShortBufferException {
if (input == null)
return 0;
if (inputOffset < 0 || inputLen < 0 || inputOffset + inputLen > input.length
|| outputOffset < 0)
throw new ArrayIndexOutOfBoundsException();
if (output.length - outputOffset < inputLen)
throw new ShortBufferException();
System.arraycopy(input, inputOffset, output, outputOffset, inputLen);
return inputLen;
}
|