#include <key_spec.h>
Represents the length requirements on an algorithm key 
Definition at line 18 of file key_spec.h.
◆ Key_Length_Specification() [1/2]
  
  | 
        
          | Botan::Key_Length_Specification::Key_Length_Specification | ( | size_t | keylen | ) |  |  | inline | 
 
Constructor for fixed length keys 
- Parameters
- 
  
    | keylen | the supported key length |  
 
Definition at line 25 of file key_spec.h.
 
 
◆ Key_Length_Specification() [2/2]
  
  | 
        
          | Botan::Key_Length_Specification::Key_Length_Specification | ( | size_t | min_k, |  
          |  |  | size_t | max_k, |  
          |  |  | size_t | k_mod = 1 |  
          |  | ) |  |  |  | inline | 
 
Constructor for variable length keys 
- Parameters
- 
  
    | min_k | the smallest supported key length |  | max_k | the largest supported key length |  | k_mod | the number of bytes the key must be a multiple of |  
 
Definition at line 38 of file key_spec.h.
   42          max_keylen(max_k ? max_k : min_k),
  
 
◆ keylength_multiple()
  
  | 
        
          | size_t Botan::Key_Length_Specification::keylength_multiple | ( |  | ) | const |  | inline | 
 
- Returns
- key length multiple in bytes 
Definition at line 77 of file key_spec.h.
 
 
◆ maximum_keylength()
  
  | 
        
          | size_t Botan::Key_Length_Specification::maximum_keylength | ( |  | ) | const |  | inline | 
 
- Returns
- maximum key length in bytes 
Definition at line 69 of file key_spec.h.
 
 
◆ minimum_keylength()
  
  | 
        
          | size_t Botan::Key_Length_Specification::minimum_keylength | ( |  | ) | const |  | inline | 
 
- Returns
- minimum key length in bytes 
Definition at line 61 of file key_spec.h.
 
 
◆ valid_keylength()
  
  | 
        
          | bool Botan::Key_Length_Specification::valid_keylength | ( | size_t | length | ) | const |  | inline | 
 
- Parameters
- 
  
    | length | is a key length in bytes |  
 
- Returns
- true iff this length is a valid length for this algo 
Definition at line 51 of file key_spec.h.
   53          return ((length >= min_keylen) &&
    54                  (length <= max_keylen) &&
    55                  (length % keylen_mod == 0));
  
 
The documentation for this class was generated from the following file: