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

This method retrieves a private key in the PKCS#8 format (unencrypted format).

This format is defined in rfc5208. If the error 'eTooSmall' is returned then one of the buffers is too small to hold the key.

Parameters
pBuffer[ in ] Block of memory to write the key 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.
wantPEM[ in ] if true then output is in PEM text format, otherwise binary data is returned
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.