Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Member Functions | 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...

#include <seckey.h>

Public Member Functions

CRYPTOPP_STATIC_CONSTEXPR size_t CRYPTOPP_API StaticGetValidKeyLength (size_t keylength)
 The minimum key length used by the algorithm provided as a constant. More...
 

Private Member Functions

 CRYPTOPP_COMPILE_ASSERT (Q > 0)
 
 CRYPTOPP_COMPILE_ASSERT (N%Q==0)
 
 CRYPTOPP_COMPILE_ASSERT (M%Q==0)
 
 CRYPTOPP_COMPILE_ASSERT (N< M)
 
 CRYPTOPP_COMPILE_ASSERT (D >=N)
 
 CRYPTOPP_COMPILE_ASSERT (M >=D)
 

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
DDefault key length, in bytes
NMinimum key length, in bytes
MMaximum key length, in bytes
QDefault key length multiple, in bytes. The default multiple is 1.
IV_REQthe IV requirements
IV_Ldefault IV length, in bytes. The default length is 0.
See also
SimpleKeyingInterface

Definition at line 169 of file seckey.h.

Member Function Documentation

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>
VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::CRYPTOPP_COMPILE_ASSERT ( Q  ,
 
)
private
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>
VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::CRYPTOPP_COMPILE_ASSERT ( N%  Q = =0)
private
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>
VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::CRYPTOPP_COMPILE_ASSERT ( M%  Q = =0)
private
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>
VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::CRYPTOPP_COMPILE_ASSERT ( )
private
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>
VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::CRYPTOPP_COMPILE_ASSERT ( D >=  N)
private
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>
VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::CRYPTOPP_COMPILE_ASSERT ( M >=  D)
private
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>
CRYPTOPP_STATIC_CONSTEXPR size_t CRYPTOPP_API VariableKeyLength< D, N, M, Q, IV_REQ, IV_L >::StaticGetValidKeyLength ( size_t  keylength)
inline

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

MIN_KEYLENGTH is provided in bytes, not bits The maximum key length used by the algorithm provided as a constant

MAX_KEYLENGTH is provided in bytes, not bits The default key length used by the algorithm provided as a constant

DEFAULT_KEYLENGTH is provided in bytes, not bits The key length multiple used by the algorithm provided as a constant

MAX_KEYLENGTH is provided in bytes, not bits 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. 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. 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 207 of file seckey.h.


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