/** * Process one block of input from the array in and write it to * the out array. * * @param in the array containing the input data. * @param inOff offset into the in array the data starts at. * @param out the array the output data will be copied into. * @param outOff the offset into the out array the output will start at. * @exception DataLengthException if there isn't enough data in in, or * space in out. * @exception IllegalStateException if the cipher isn't initialised. * @return the number of bytes processed and produced. */ public int processBlock( byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException { if (inlineIv) { return (forEncryption) ? encryptBlockWithIV(in, inOff, out, outOff) : decryptBlockWithIV(in, inOff, out, outOff); } else { return (forEncryption) ? encryptBlock(in, inOff, out, outOff) : decryptBlock(in, inOff, out, outOff); } }
out[outOff + n] = encryptByte(tmp[n + 2], n); out[outOff + 0] = encryptByte(tmp[0], blockSize - 2); out[outOff + 1] = encryptByte(tmp[1], blockSize - 1); out[outOff + n + 2] = encryptByte(tmp[n + 2], n);
new PGPCFBBlockCipher(baseEngine, inlineIV));
out[outOff + n] = encryptByte(tmp[n + 2], n); out[outOff + 0] = encryptByte(tmp[0], blockSize - 2); out[outOff + 1] = encryptByte(tmp[1], blockSize - 1); out[outOff + n + 2] = encryptByte(tmp[n + 2], n);
/** * Process one block of input from the array in and write it to * the out array. * * @param in the array containing the input data. * @param inOff offset into the in array the data starts at. * @param out the array the output data will be copied into. * @param outOff the offset into the out array the output will start at. * @exception DataLengthException if there isn't enough data in in, or * space in out. * @exception IllegalStateException if the cipher isn't initialised. * @return the number of bytes processed and produced. */ public int processBlock( byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException { if (inlineIv) { return (forEncryption) ? encryptBlockWithIV(in, inOff, out, outOff) : decryptBlockWithIV(in, inOff, out, outOff); } else { return (forEncryption) ? encryptBlock(in, inOff, out, outOff) : decryptBlock(in, inOff, out, outOff); } }
out[outOff + n] = encryptByte(IV[n], n); out[outOff + blockSize] = encryptByte(IV[blockSize - 2], 0); out[outOff + blockSize + 1] = encryptByte(IV[blockSize - 1], 1); out[outOff + blockSize + 2 + n] = encryptByte(in[inOff + n], n); out[outOff + n] = encryptByte(in[inOff + n], n);
out[outOff + n] = encryptByte(IV[n], n); out[outOff + blockSize] = encryptByte(IV[blockSize - 2], 0); out[outOff + blockSize + 1] = encryptByte(IV[blockSize - 1], 1); out[outOff + blockSize + 2 + n] = encryptByte(in[inOff + n], n); out[outOff + n] = encryptByte(in[inOff + n], n);
for (int n = 0; n < blockSize; n++) out[outOff + n] = encryptByte(in[inOff + n], n);
for (int n = 0; n < blockSize; n++) out[outOff + n] = encryptByte(in[inOff + n], n);
for (int n = 0; n < blockSize; n++) out[outOff + n] = encryptByte(in[inOff + n], n);
for (int n = 0; n < blockSize; n++) out[outOff + n] = encryptByte(in[inOff + n], n);