public int processBlock( byte[] in, int inOff, byte[] out, int outOff) { if (_workingKey == null) { throw new IllegalStateException(getAlgorithmName()+" not initialised"); } int blockSize = getBlockSize(); if ((inOff + blockSize) > in.length) { throw new DataLengthException("Input buffer too short"); } if ((outOff + blockSize) > out.length) { throw new OutputLengthException("Output buffer too short"); } if (_encrypting) { return encryptBlock(in, inOff, out, outOff); } else { return decryptBlock(in, inOff, out, outOff); } }
public int processBlock( byte[] in, int inOff, byte[] out, int outOff) { if (_workingKey == null) { throw new IllegalStateException(getAlgorithmName()+" not initialised"); } int blockSize = getBlockSize(); if ((inOff + blockSize) > in.length) { throw new DataLengthException("input buffer too short"); } if ((outOff + blockSize) > out.length) { throw new OutputLengthException("output buffer too short"); } if (_encrypting) { return encryptBlock(in, inOff, out, outOff); } else { return decryptBlock(in, inOff, out, outOff); } }