Botan

Stream Cipher

License
Botan is released under the Simplified BSD License (see LICENSE.md)

interface  StreamCipher: botan.algo_base.sym_algo.SymmetricAlgorithm;

Base class for all stream ciphers


abstract void  cipher(const(ubyte)* input, ubyte* output, size_t len);

Encrypt or decrypt a message

Parameters
const(ubyte)* input the plaintext
ubyte* output the ubyte array to hold the output, i.e. the ciphertext
size_t len the length of both in and out in bytes

final void  cipher1(const(ubyte)* buf, size_t len);

Encrypt or decrypt a message

Parameters
const(ubyte)* buf the plaintext / ciphertext
size_t len the length of buf in bytes

final void  cipher1(ref ubyte[] buf);

Encrypt or decrypt a message

Parameters
ubyte[] buf the plaintext / ciphertext

abstract void  setIv(const(ubyte)* iv, size_t iv_len);

Resync the cipher using the IV

Parameters
const(ubyte)* iv the initialization vector
size_t iv_len the length of the IV in bytes

abstract const bool  validIvLength(size_t iv_len);

Parameters
size_t iv_len the length of the IV in bytes
Returns
if the length is valid for this algorithm

abstract const StreamCipher  clone();

Get a new object representing the same algorithm as this