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
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | Object is in an incorrect state. |
P6R::eInvalidArg | One of the pointers is NULL. |
P6R::eWrongKeyClass | The class of this key is not CKC_PUBLIC. |
P6R::eWrongKeyType | Must be RSA |
P6R::eTooSmall | One of the buffers is too small to hold the requested value. |