Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IGenKeys::genSymmetricKeyRaw ( P6UCHAR pKeyBuffer,
P6INT32  cKeyBuffer,
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 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
SuccessP6R::eOk 
FailureeInvalidArgOne of the parameters is NULL, keySize is zero, or cKeyBuffer is zero..
eNotInitializedA successful call to initialize was not made before this call.
eTooSmall/td>pKeyBuffer is too small for the generated key.
eTooBigThe given keySize is larger than the max key size.