Botan

KeyedFilter

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

abstract class  KeyedFilter: botan.filters.filter.Filter;

This class represents keyed filters, i.e. filters that have to be fed with a key in order to function.


abstract void  setKey(in SymmetricKey key);

Set the key of this filter

Parameters
SymmetricKey key the key to use

void  setIv(in InitializationVector iv);

Set the initialization vector of this filter. Note: you should call  setIv() only after you have called setKey()

Parameters
InitializationVector iv the initialization vector to use

const bool  validKeylength(size_t length);

Check whether a key length is valid for this filter

Parameters
size_t length the key length to be checked for validity
Returns
true if the key length is valid, false otherwise

abstract const KeyLengthSpecification  keySpec();

Returns
object describing limits on key size

abstract const bool  validIvLength(size_t length);

Check whether an IV length is valid for this filter

Parameters
size_t length the IV length to be checked for validity
Returns
true if the IV length is valid, false otherwise