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

Public Member Functions | List of all members
SimpleKeyingInterfaceImpl< BASE, INFO > Class Template Reference

Provides a base implementation of SimpleKeyingInterface. More...

Inheritance diagram for SimpleKeyingInterfaceImpl< BASE, INFO >:

## Public Member Functions
size_t | MinKeyLength () const
| The minimum key length used by the algorithm. More...
size_t | MaxKeyLength () const
| The maximum key length used by the algorithm. More...
size_t | DefaultKeyLength () const
| The default key length used by the algorithm. More...
size_t | GetValidKeyLength (size_t keylength) const
| Provides a valid key length for the algorithm. More...
SimpleKeyingInterface::IV_Requirement | IVRequirement () const
| The default IV requirements for the algorithm. More...
unsigned int | IVSize () const
| The initialization vector length for the algorithm. More...

## Detailed Description

### template<class BASE, class INFO = BASE>
class SimpleKeyingInterfaceImpl< BASE, INFO >

Provides a base implementation of SimpleKeyingInterface.

Template Parameters

  BASE | a SimpleKeyingInterface derived class
  INFO | a SimpleKeyingInterface derived class

SimpleKeyingInterfaceImpl() provides a default implementation for ciphers providing a keying interface. Functions are virtual and not eligible for C++11 `constexpr`-ness.

See also
  Algorithm(), SimpleKeyingInterface()

Definition at line 257 of file seckey.h.

## Member Function Documentation

## ◆ MinKeyLength()

template<class BASE, class INFO = BASE>

size_t SimpleKeyingInterfaceImpl< BASE, INFO >::MinKeyLength | ( |  | ) | const
| inline

The minimum key length used by the algorithm.

Returns
  minimum key length used by the algorithm, in bytes

Definition at line 262 of file seckey.h.

## ◆ MaxKeyLength()

template<class BASE, class INFO = BASE>

size_t SimpleKeyingInterfaceImpl< BASE, INFO >::MaxKeyLength | ( |  | ) | const
| inline

The maximum key length used by the algorithm.

Returns
  maximum key length used by the algorithm, in bytes

Definition at line 267 of file seckey.h.

## ◆ DefaultKeyLength()

template<class BASE, class INFO = BASE>

size_t SimpleKeyingInterfaceImpl< BASE, INFO >::DefaultKeyLength | ( |  | ) | const
| inline

The default key length used by the algorithm.

Returns
  default key length used by the algorithm, in bytes

Definition at line 272 of file seckey.h.

## ◆ GetValidKeyLength()

template<class BASE, class INFO = BASE>

size_t SimpleKeyingInterfaceImpl< BASE, INFO >::GetValidKeyLength | ( | size_t | keylength | ) | const
| inline

Provides a valid key length for the algorithm.

Parameters

  keylength | the size of the key, in bytes

Returns
  the valid key length, in bytes

keylength is provided in bytes, not bits. 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 If keylength is a multiple of KEYLENGTH_MULTIPLE, then keylength is returned. Otherwise, the function returns a lower multiple of KEYLENGTH_MULTIPLE.

Definition at line 283 of file seckey.h.

## ◆ IVRequirement()

template<class BASE, class INFO = BASE>

SimpleKeyingInterface::IV_Requirement SimpleKeyingInterfaceImpl< BASE, INFO >::IVRequirement | ( |  | ) | const
| inline

The default IV requirements for the algorithm.

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

Definition at line 288 of file seckey.h.

## ◆ IVSize()

template<class BASE, class INFO = BASE>

unsigned int SimpleKeyingInterfaceImpl< BASE, INFO >::IVSize | ( |  | ) | const
| inline

The initialization vector length for the algorithm.

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

Definition at line 294 of file seckey.h.

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

- seckey.h