Symetric keys are used for the bulk of encrypting data since PKI encryption is slow.
This method generates a symetric key and saves it into a buffer. Note, that currently the generated key is not encrypted.
Generate the key in the provided buffer without any P6R meta data, IV, or PEM wrapper.
- Parameters
-
pKeyBuffer | [ in ] File to create, store in PEM encoding the generated key. |
cKeyBuffer | [ in ] The size in bytes of the buffer pointed to by pKeyBuffer. |
keySize | [ in ] Number of bits used in generating key |
bReseed | [ in ] Force the reseeding of the random number generator used in key generation. |
- Returns
Success | P6R::eOk | |
Failure | eInvalidArg | One of the parameters is NULL, keySize is zero, or cKeyBuffer is zero.. |
eNotInitialized | A successful call to initialize was not made before this call. |
eTooSmall/td> | pKeyBuffer is too small for the generated key. |
eTooBig | The given keySize is larger than the max key size. |