Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ICryptoKey::getSymetricKey ( P6UCHAR pBuffer,
P6UINT32  cBuffer,
P6UINT32 pWritten 
)
pure virtual

This method retrieves the raw bits of a symetric key (i.e., no metadata and not base64 encoded – see serializeToBuffer()) If the error 'eTooSmall' is returned then one of the buffers is too small to hold the symetric key.

Parameters
pBuffer[ in ] Block of memory to write the raw key bits into, when NULL the required size of this buffer is returned in pWritten
cBuffer[ in ] Number of bytes in the buffer pointed to by pBuffer.
pWritten[ out ] Optional can be NULL, returns the number of bytes written into pBuffer. This parameter cannot be NULL when pBuffer is also NULL.
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedObject is in an incorrect state.
P6R::eInvalidArgpBuffer and pWritten are NULL.
P6R::eWrongKeyClassThe class of this key is not CKC_SYMMETRIC.
P6R::eTooSmallThe buffers is too small to hold the requested value.