Module Nettle.BufferedCipher()->Buffer

Inheritance graph
__builtin.Nettle.Cipher Nettle.BufferedCipher.Buffer
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

BlockCipher.CBC, BlockCipher16.GCM


Inherit Cipher

inherit __builtin.Nettle.Cipher : Cipher