Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IGenKeys::genSymmetricKey ( p6ICryptoKey **  ppKey,
P6UINT32  keySize,
P6BOOL  bReseed 
)
pure virtual

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
SuccessP6R::eOk 
FailureeInvalidArgOne of the parameters is NULL or keySize is zero.
eNotInitializedA successful call to initialize was not made before this call.
eIoErrorCould not create the key file.
p6IEntropySourceError returned from pEntropy.
eFailThe key generation calculation failed.