Crypto++ 8.6 Free C++ class library of cryptographic schemes

Static Public Member Functions | Static Public Attributes | List of all members
VariableKeyLength< D, N, M, Q, IV_REQ, IV_L > Class Template Reference

Inherited by keyed algorithms with variable key length. More...

## Static Public Member Functions
static size_t | StaticGetValidKeyLength (size_t keylength)
| Provides a valid key length for the algorithm provided by a static function. More...

## Static Public Attributes
static const int | MIN_KEYLENGTH =N
| The minimum key length used by the algorithm provided as a constant. More...
static const int | MAX_KEYLENGTH =M
| The maximum key length used by the algorithm provided as a constant. More...
static const int | DEFAULT_KEYLENGTH =D
| The default key length used by the algorithm provided as a constant. More...
static const int | KEYLENGTH_MULTIPLE =Q
| The key length multiple used by the algorithm provided as a constant. More...
static const int | IV_REQUIREMENT =IV_REQ
| The default IV requirements for the algorithm provided as a constant. More...
static const int | IV_LENGTH =IV_L
| The default initialization vector length for the algorithm provided as a constant. More...

## Detailed Description

### template<unsigned int D, unsigned int N, unsigned int M, unsigned int Q = 1, unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>
class VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >

Inherited by keyed algorithms with variable key length.

Template Parameters

  D | Default key length, in bytes
  N | Minimum key length, in bytes
  M | Maximum key length, in bytes
  Q | Default key length multiple, in bytes. The default multiple is 1.
  IV_REQ | the IV requirements
  IV_L | default IV length, in bytes. The default length is 0.

See also
  SimpleKeyingInterface

Definition at line 165 of file seckey.h.

## Member Function Documentation

## ◆ StaticGetValidKeyLength()

template<unsigned int D, unsigned int N, unsigned int M, unsigned int Q = 1, unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>

static size_t VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::StaticGetValidKeyLength | ( | size_t | keylength | ) |
| inline static

Provides a valid key length for the algorithm provided by a static function.

Parameters

  keylength | the size of the key, in bytes

If keylength is less than MIN_KEYLENGTH, then the function returns MIN_KEYLENGTH. If keylength is greater than MAX_KEYLENGTH, then the function returns MAX_KEYLENGTH. If keylength is a multiple of KEYLENGTH_MULTIPLE, then keylength is returned. Otherwise, the function returns keylength rounded down to the next smaller multiple of KEYLENGTH_MULTIPLE.

keylength is provided in bytes, not bits.

Definition at line 203 of file seckey.h.

## Member Data Documentation

## ◆ MIN_KEYLENGTH

template<unsigned int D, unsigned int N, unsigned int M, unsigned int Q = 1, unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>

const int VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::MIN_KEYLENGTH =N
| static

The minimum key length used by the algorithm provided as a constant.

MIN_KEYLENGTH is provided in bytes, not bits

Definition at line 178 of file seckey.h.

## ◆ MAX_KEYLENGTH

template<unsigned int D, unsigned int N, unsigned int M, unsigned int Q = 1, unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>

const int VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::MAX_KEYLENGTH =M
| static

The maximum key length used by the algorithm provided as a constant.

MAX_KEYLENGTH is provided in bytes, not bits

Definition at line 181 of file seckey.h.

## ◆ DEFAULT_KEYLENGTH

template<unsigned int D, unsigned int N, unsigned int M, unsigned int Q = 1, unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>

const int VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::DEFAULT_KEYLENGTH =D
| static

The default key length used by the algorithm provided as a constant.

DEFAULT_KEYLENGTH is provided in bytes, not bits

Definition at line 184 of file seckey.h.

## ◆ KEYLENGTH_MULTIPLE

template<unsigned int D, unsigned int N, unsigned int M, unsigned int Q = 1, unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>

const int VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::KEYLENGTH_MULTIPLE =Q
| static

The key length multiple used by the algorithm provided as a constant.

MAX_KEYLENGTH is provided in bytes, not bits

Definition at line 187 of file seckey.h.

## ◆ IV_REQUIREMENT

template<unsigned int D, unsigned int N, unsigned int M, unsigned int Q = 1, unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>

const int VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::IV_REQUIREMENT =IV_REQ
| static

The default IV requirements for the algorithm provided as a constant.

The default value is NOT_RESYNCHRONIZABLE. See IV_Requirement in cryptlib.h for allowed values.

Definition at line 191 of file seckey.h.

## ◆ IV_LENGTH

template<unsigned int D, unsigned int N, unsigned int M, unsigned int Q = 1, unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>

const int VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::IV_LENGTH =IV_L
| static

The default initialization vector length for the algorithm provided as a constant.

IV_LENGTH is provided in bytes, not bits. The default implementation uses 0.

Definition at line 194 of file seckey.h.

The documentation for this class was generated from the following file:

- seckey.h