Methods Summary |
---|
protected byte[] | engineDoFinal(byte[] in, int off, int len)
byte out[] = new byte[len - off];
engineUpdate(in, off, len, out, 0);
return out;
|
protected int | engineDoFinal(byte[] in, int inoff, int len, byte[] out, int outoff)
return engineUpdate(in, inoff, len, out, outoff);
|
protected int | engineGetBlockSize()
return 1;
|
protected byte[] | engineGetIV()
return null;
|
protected int | engineGetOutputSize(int sz)
return sz;
|
protected java.security.AlgorithmParameters | engineGetParameters()
return null;
|
protected void | engineInit(int i, java.security.Key k, java.security.SecureRandom sr)
if (!(k instanceof XORKey))
throw new InvalidKeyException("XOR requires an XOR key");
xorByte = k.getEncoded()[0];
|
protected void | engineInit(int i, java.security.Key k, java.security.spec.AlgorithmParameterSpec aps, java.security.SecureRandom sr)
throw new InvalidAlgorithmParameterException(
"Algorithm parameters not supported in this class");
|
protected void | engineInit(int i, java.security.Key k, java.security.AlgorithmParameters ap, java.security.SecureRandom sr)
throw new InvalidAlgorithmParameterException(
"Algorithm parameters not supported in this class");
|
protected void | engineSetMode(java.lang.String s)
throw new NoSuchAlgorithmException("Unsupported mode " + s);
|
protected void | engineSetPadding(java.lang.String s)
throw new NoSuchPaddingException("Unsupported padding " + s);
|
protected byte[] | engineUpdate(byte[] in, int off, int len)
return engineDoFinal(in, off, len);
|
protected int | engineUpdate(byte[] in, int inoff, int length, byte[] out, int outoff)
for (int i = 0; i < length; i++)
out[outoff + i] = (byte) (in[inoff + i] ^ xorByte);
return length;
|