Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ICryptoKey::getRSAPublicKey ( P6BSTR pN,
P6BSTR pE 
)
pure virtual

This method retrieves the standard parts of a RSA public 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, pE).

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.
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.
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_PUBLIC.
P6R::eWrongKeyTypeMust be RSA
P6R::eTooSmallOne of the buffers is too small to hold the requested value.