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
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | Object is in an incorrect state. |
P6R::eInvalidArg | pBuffer and pWritten are NULL. |
P6R::eWrongKeyClass | The class of this key is not CKC_SYMMETRIC. |
P6R::eTooSmall | The buffers is too small to hold the requested value. |