Symetric keys are used for the bulk of encrypting data since PKI encryption is slow.
This method generates a symetric key and returns a P6R::ICryptoKey interface for the newly generated key. The P6R::ICryptoKey interface can be passed to other crypto methods that require a key and it can be used to serialize the key data to a file or buffer.
- Parameters
-
ppKey | [ out ] The address of a pointer to a P6R::ICryptoKey in which will be placed a pointer to the newly created P6R::ICryptokey. |
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 or keySize is zero. |
eNotInitialized | A successful call to initialize was not made before this call. |
eIoError | Could not create the key file. |
p6IEntropySource | Error returned from pEntropy. |
eFail | The key generation calculation failed. |