static private BlockXor ( byte src, int s_offset, int len, byte dest, int d_offset ) : void | ||
src | byte | |
s_offset | int | |
len | int | |
dest | byte | |
d_offset | int | |
Résultat | void |
public void EncryptCBC(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) { int nBlocks = inputLen / 8; for (int bc = 0; bc < nBlocks; bc++) { CipherUtil.BlockXor(input, inputOffset, 8, _iv, 0); BlockEncrypt(_iv, 0, output, outputOffset); Array.Copy(output, outputOffset, _iv, 0, 8); inputOffset += 8; outputOffset += 8; } }
public void encryptCBC(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) { int nBlocks = inputLen / BLOCK_SIZE; for (int bc = 0; bc < nBlocks; bc++) { CipherUtil.BlockXor(input, inputOffset, BLOCK_SIZE, IV, 0); blockEncrypt(IV, 0, output, outputOffset); Array.Copy(output, outputOffset, IV, 0, BLOCK_SIZE); inputOffset += BLOCK_SIZE; outputOffset += BLOCK_SIZE; } }
public void encryptCBC(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) { int block_size = GetBlockSize(); int nBlocks = inputLen / block_size; for (int bc = 0; bc < nBlocks; bc++) { CipherUtil.BlockXor(input, inputOffset, block_size, _IV, 0); blockEncrypt(_IV, 0, output, outputOffset); Array.Copy(output, outputOffset, _IV, 0, block_size); inputOffset += block_size; outputOffset += block_size; } }