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

This method retrieves the binary key data for Diffie-Hellman generated private key.

Parameters
pBuffer[ in ] A pointer to a buffer in which to store the key's bytes. If NULL, then the required size of a buffer to hold the key is returned in pWritten.
cBuffer[ in ] Number of entries 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 both NULL.
P6R::eInvalidStateA call to genDHKeyPair() or one of the load methods must be made before a call to this function.
P6R::eTooSmallThe buffer pointed to by pBuffer is not large enough to hold the key data.