Class Nettle.BufferedCipher()->Buffer.State
- Description
Acts as a buffer so that data can be fed to the cipher in blocks that don't correspond to cipher block sizes.
- Example
class Encrypter { protected Crypto.Cipher buffer;
void create(string key) { buffer = Crypto.AES.CBC.Buffer(); buffer->set_encrypt_key(key); }
string feed(string data) { return buffer->crypt(data); }
string drain() { return buffer->pad(Crypto.PAD_PKCS7); } }
- See also
- Method create
Nettle.BufferedCipher.Buffer.State Nettle.BufferedCipher.Buffer.State()
- Description
Initialize the buffer with the Cipher::State object returned by substate_factory(). This is usually the State for the cipher implemented in the parent module.