Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IDHKeyExchange::getRawPrivateKey ( P6BSTR pP,
P6BSTR pG,
P6BSTR pX 
)
pure virtual

This method retrieves the standard parts of a a Diffie-Hellman (DH) private key.

If the error 'eTooSmall' is returned then one of the buffers is too small to hold part of the DSA key. In this case all the length parameters (e.g., pP->length) are assigned the required length. In this way, only one call is needed to this method to determine the size of all the required buffers (e.g., pP, pQ, pG, pY). To be able to use the DSA public key its associated DSA parameters must also be available.

Parameters
pP[ INOUT ] The shared prime number If pP->pString is NULL, then all the buffer required lengths will be returned. pP->length is the address of a P6UINT32 containing the size in bytes of pP->pString. On success the number of bytes stored in pP->pString will be returned in pP->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key.
pG[ INOUT ] The shared generator If pG->pString is NULL, then all the buffer required lengths will be returned. pG->length is the address of an P6UINT32 containing the size in bytes of pG->pString. On success the number of bytes stored in pG->pString will be returned in pG->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key.
pY[ INOUT ] The private key value If pY->pString is NULL, then all the buffer required lengths will be returned. pY->length is the address of an P6UINT32 containing the size in bytes of pY->pString. On success the number of bytes stored in pY->pString will be returned in pY->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key.
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedObject is in an incorrect state.
P6R::eInvalidArgOne of the pointers is NULL.
P6R::eInvalidStateA call to genDHKeyPair() or one of the load methods must be made before a call to this function.
P6R::eTooSmallOne of the buffers is too small to hold the requested value.