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

This method retrieves the binary prime value set by the call to genDHKeyPair().

Parameters
pBuffer[ in ] A pointer to a buffer in which to store the prime's bytes If NULL, then the required size of a buffer to hold the prime 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() 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.