BufferedBlockCipher

Members

Functions

doFinal
uint doFinal(ubyte[] output)

encrypt the remaining bytes in the buffer

getUnderlyingCipher
Cipher getUnderlyingCipher()
processByte
uint processByte(in ubyte b, ubyte[] output)

takes one byte and stores it in a buffer. Only if the buffer is full it gets encrypted and the cipher text gets written to output.

processBytes
uint processBytes(in ubyte[] i, ubyte[] output)

encrypt or decrypt byte array

Variables

buf
ubyte[blockSize] buf;

buffer for incomplete blocks

bufOff
uint bufOff;

where the next byte get added to the buffer (i.e. buf[bufOff++] = newByte)

cipher
Cipher cipher;

the underlying block cipher

Examples

BufferedBlockCipher!AES) ecbEncryption; BufferedBlockCipher!(CTR!AES, true) ctrEncryption;

Meta