Security Scol plugin
Public Member Functions | List of all members
SameKeyLengthAs< T, IV_REQ, IV_L > Class Template Reference

Provides key lengths based on another class's key length. More...

#include <seckey.h>

Inheritance diagram for SameKeyLengthAs< T, IV_REQ, IV_L >:
CMAC< T_BlockCipher > CBC_MAC< T > CMAC< T > DMAC_Base< T > SimpleKeyingInterfaceImpl< DMAC_Base< T >, DMAC_Base< T > > AlgorithmImpl< SimpleKeyingInterfaceImpl< DMAC_Base< T >, DMAC_Base< T > >, DMAC_Base< T > >

Public Member Functions

 CRYPTOPP_CONSTANT (MIN_KEYLENGTH=T::MIN_KEYLENGTH)
 The minimum key length used by the algorithm provided as a constant.
 
 CRYPTOPP_CONSTANT (MAX_KEYLENGTH=T::MAX_KEYLENGTH)
 The maximum key length used by the algorithm provided as a constant.
 
 CRYPTOPP_CONSTANT (DEFAULT_KEYLENGTH=T::DEFAULT_KEYLENGTH)
 The default key length used by the algorithm provided as a constant.
 
 CRYPTOPP_CONSTANT (IV_REQUIREMENT=IV_REQ)
 The default IV requirements for the algorithm provided as a constant.
 
 CRYPTOPP_CONSTANT (IV_LENGTH=IV_L)
 The default initialization vector length for the algorithm provided as a constant.
 
CRYPTOPP_STATIC_CONSTEXPR size_t CRYPTOPP_API StaticGetValidKeyLength (size_t keylength)
 Provides a valid key length for the algorithm provided by a static function.
 

Detailed Description

template<class T, unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>
class SameKeyLengthAs< T, IV_REQ, IV_L >

Provides key lengths based on another class's key length.

Template Parameters
Tanother FixedKeyLength or VariableKeyLength class
IV_REQthe IV requirements
IV_Ldefault IV length, in bytes
See also
SimpleKeyingInterface

Definition at line 217 of file seckey.h.

Member Function Documentation

◆ CRYPTOPP_CONSTANT() [1/5]

template<class T , unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>
SameKeyLengthAs< T, IV_REQ, IV_L >::CRYPTOPP_CONSTANT ( DEFAULT_KEYLENGTH  = T::DEFAULT_KEYLENGTH)

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

MIN_KEYLENGTH is provided in bytes, not bits

◆ CRYPTOPP_CONSTANT() [2/5]

template<class T , unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>
SameKeyLengthAs< T, IV_REQ, IV_L >::CRYPTOPP_CONSTANT ( IV_LENGTH  = IV_L)

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.

◆ CRYPTOPP_CONSTANT() [3/5]

template<class T , unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>
SameKeyLengthAs< T, IV_REQ, IV_L >::CRYPTOPP_CONSTANT ( IV_REQUIREMENT  = IV_REQ)

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.

◆ CRYPTOPP_CONSTANT() [4/5]

template<class T , unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>
SameKeyLengthAs< T, IV_REQ, IV_L >::CRYPTOPP_CONSTANT ( MAX_KEYLENGTH  = T::MAX_KEYLENGTH)

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

MIN_KEYLENGTH is provided in bytes, not bits

◆ CRYPTOPP_CONSTANT() [5/5]

template<class T , unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>
SameKeyLengthAs< T, IV_REQ, IV_L >::CRYPTOPP_CONSTANT ( MIN_KEYLENGTH  = T::MIN_KEYLENGTH)

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

MIN_KEYLENGTH is provided in bytes, not bits

◆ StaticGetValidKeyLength()

template<class T , unsigned int IV_REQ = SimpleKeyingInterface::NOT_RESYNCHRONIZABLE, unsigned int IV_L = 0>
CRYPTOPP_STATIC_CONSTEXPR size_t CRYPTOPP_API SameKeyLengthAs< T, IV_REQ, IV_L >::StaticGetValidKeyLength ( size_t  keylength)
inline

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

Parameters
keylengththe 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 244 of file seckey.h.


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