An DES symmetric key.
More...
#include <des_symmetric_key.hpp>
An DES symmetric key.
DESSymmetricKey represents a 8, 16 or 24 bytes long DES key to use with an instance DESCipher.
You can create an DESSymmetricKey from random values, using createRandom() or from specific data, using createFromData().
◆ DESSymmetricKey() [1/2]
logicalaccess::openssl::DESSymmetricKey::DESSymmetricKey |
( |
size_t |
size | ) |
|
|
explicitprotected |
Create a new random DESSymmetricKey.
- Parameters
-
size | The size of the key. Must be 8, 16, or 24. |
◆ DESSymmetricKey() [2/2]
logicalaccess::openssl::DESSymmetricKey::DESSymmetricKey |
( |
const ByteVector & |
data | ) |
|
|
explicitprotected |
Create an DESInitializationVector from existing data.
- Parameters
-
- Warning
- If data is not 8, 16 or 24 bytes long, the behavior is undefined.
◆ createFromData()
Create a symmetric key from the specified data.
- Parameters
-
- Returns
- The symmetric key.
- Warning
- If data is not 8, 16 or 24 bytes long, the behavior is undefined.
◆ createRandom()
DESSymmetricKey logicalaccess::openssl::DESSymmetricKey::createRandom |
( |
size_t |
size | ) |
|
|
static |
Create a random symmetric key of a given length.
- Parameters
-
size | The size of the key. Must be 8, 16, or 24. |
- Returns
- The symmetric key.
The documentation for this class was generated from the following files: