Qt Cryptographic Architecture
|
#include <QtCrypto>
Public Member Functions | |
KeyLength (int min, int max, int multiple) | |
int | maximum () const |
int | minimum () const |
int | multiple () const |
Simple container for acceptable key lengths.
The KeyLength specifies the minimum and maximum byte sizes allowed for a key, as well as a "multiple" which the key size must evenly divide into.
As an example, if the key can be 4, 8 or 12 bytes, you can express this as
If you want to express a KeyLength that takes any number of bytes (including zero), you may want to use
|
inline |
Construct a KeyLength object.
min | the minimum length of the key, in bytes |
max | the maximum length of the key, in bytes |
multiple | the number of bytes that the key must be a multiple of. |
|
inline |
Obtain the minimum length for the key, in bytes.
|
inline |
Obtain the maximum length for the key, in bytes.
|
inline |
Return the number of bytes that the key must be a multiple of.
If this is one, then anything between minimum and maximum (inclusive) is acceptable.