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
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | Object is in an incorrect state. |
P6R::eInvalidArg | pBuffer and pWritten are both NULL. |
P6R::eInvalidState | A call to genDHKeyPair() or one of the load methods must be made before a call to this function. |
P6R::eTooSmall | The buffer pointed to by pBuffer is not large enough to hold the key data. |