Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ICryptoKey2::getRSAPrivateKey ( P6BSTR pN,
P6BSTR pD,
P6BSTR pE,
P6BSTR pP,
P6BSTR pQ,
P6BSTR pPrimeExpP,
P6BSTR pPrimeExpQ,
P6BSTR pCRT 
)
pure virtual

This method retrieves the standard parts of a RSA private key.

If the error 'eTooSmall' is returned then one of the buffers is too small to hold part of the RSA key. In this case all the length parameters (e.g., pN->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., pN, pD, pE, pP, pQ, pPrimeExpP, pPrimeExpQ, pCRT).

Parameters
pN[ in ] The public modulus. If pN->pString is NULL then all the buffer required lengths will be returned. pN->length is the address of an P6UINT32 containing the size in bytes of pN->pString. On success the number of bytes stored in pN->pString will be returned in pN->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key.
pD[ in ] The private exponent. If pD->pString is NULL then all the buffer required lengths will be returned. pD->length is the address of an P6UINT32 containing the size in bytes of pD->pString. On success the number of bytes stored in pD->pString will be returned in pD->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key.
pE[ in ] The public exponent. If pE->pString is NULL then all the buffer required lengths will be returned. pE->length is the address of an P6UINT32 containing the size in bytes of pE->pString. On success the number of bytes stored in pE->pString will be returned in pE->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key.
pP[ INOUT ] One of the RSA parameters. 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.
pQ[ INOUT ] One of the RSA parameters. If pQ->pString is NULL, then all the buffer required lengths will be returned. pQ->length is the address of a P6UINT32 containing the size in bytes of pQ->pString. On success the number of bytes stored in pQ->pString will be returned in pQ->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key.
pPrimeExpP[ INOUT ] Prime Exponent P If pPrimeExpP->pString is NULL, then all the buffer required lengths will be returned. pPrimeExpP->length is the address of a P6UINT32 containing the size in bytes of pPrimeExpP->pString. On success the number of bytes stored in pPrimeExpP->pString will be returned in pPrimeExpP->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key.
pPrimeExpQ[ INOUT ] Prime Exponent Q If pPrimeExpQ->pString is NULL, then all the buffer required lengths will be returned. pPrimeExpQ->length is the address of a P6UINT32 containing the size in bytes of pPrimeExpQ->pString. On success the number of bytes stored in pPrimeExpQ->pString will be returned in pPrimeExpQ->length. If eTooSmall is returned then this parameter is assigned the buffer size required for the key.
pCRT[ INOUT ] CRT Coefficient If pCRT->pString is NULL, then all the buffer required lengths will be returned. pCRT->length is the address of a P6UINT32 containing the size in bytes of pCRT->pString. On success the number of bytes stored in pCRT->pString will be returned in pCRT->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::eWrongKeyClassThe class of this key is not CKC_PRIVATE.
P6R::eWrongKeyTypeMust be RSA
P6R::eTooSmallOne of the buffers is too small to hold the requested value.