Botan

Transformations of data

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

interface  Transformation;

Interface for general transformations on data


final SecureVector!ubyte  startVec(Alloc)(auto ref const RefCounted!(Vector!(ubyte, Alloc), Alloc) nonce);

Begin processing a message.

Parameters
RefCounted!(Vector!(ubyte, Alloc), Alloc) nonce the per message nonce

abstract SecureVector!ubyte  start(const(ubyte)* nonce, size_t nonce_len);

Begin processing a message.

Parameters
const(ubyte)* nonce the per message nonce
size_t nonce_len length of nonce

abstract void  update(ref SecureVector!ubyte blocks, size_t offset = 0);

Process some data. Input must be in size updateGranularity() ubyte blocks.

Parameters
SecureVector!ubyte blocks in/out paramter which will possibly be resized
size_t offset an offset into blocks to begin processing

abstract void  finish(ref SecureVector!ubyte final_block, size_t offset = 0);

Complete processing of a message.

Parameters
SecureVector!ubyte final_block in/out parameter which must be at least minimumFinalSize() bytes, and will be set to any final output
size_t offset an offset into final_block to begin processing

abstract const size_t  outputLength(size_t input_length);

Returns
The size of the output if this transform is used to process a message with input_length bytes. Will throw if unable to give a precise answer.

abstract const size_t  updateGranularity();

Returns
size of required blocks to update

abstract const size_t  minimumFinalSize();

Returns
required minimium size to finalize() - may be any length larger than this.

abstract const size_t  defaultNonceLength();

Returns
the default size for a nonce

abstract const bool  validNonceLength(size_t nonce_len);

Returns
true iff nonce_len is a valid length for the nonce

abstract const string  provider();

Short name describing the  provider of this tranformation.

Useful in cases where multiple implementations are available (eg, different implementations of AES). Default "core" is used for the 'standard' implementation included in the library.