Botan

Symmetric Key Length Specification

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

Represents the length requirements on an algorithm key


this(size_t keylen);

Constructor for fixed length keys

Parameters
size_t keylen the supported key length

this(size_t min_k, size_t max_k, size_t k_mod = 1);

Constructor for variable length keys

Parameters
size_t min_k the smallest supported key length
size_t max_k the largest supported key length
size_t k_mod the number of bytes the key must be a multiple of

const bool  validKeylength(size_t length);

Parameters
size_t length is a key length in bytes
Returns
true iff this length is a valid length for this algo

const size_t  minimumKeylength();

Returns
minimum key length in bytes

const size_t  maximumKeylength();

Returns
maximum key length in bytes

const size_t  keylengthMultiple();

Returns
key length multiple in bytes