BufferedBlockCipher

Members

Functions

doFinal
uint doFinal(ubyte[] output)

encrypt the remaining bytes in the buffer

getUnderlyingCipher
Cipher getUnderlyingCipher()
processByte
uint processByte(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(ubyte[] i, ubyte[] output)

encrypt or decrypt byte array

reset
void reset()
Undocumented in source. Be warned that the author may not have intended to support it.
start
void start(bool forEncryption, ubyte[] key, ubyte[] iv)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

blockSize
enum blockSize;
Undocumented in source.
name
enum name;
Undocumented in source.

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

Parameters

permitPartialBlock

tells wether the underlying cipher supports a partial last block (CTR does). default: false

Examples

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

Meta