This method retrieves the standard parts of an Eliptical Curve (EC) private key (this function only handles built-in curves that have a name).
If the error 'eTooSmall' is returned then one of the buffers is too small to hold part of the EC key. In this case all the length parameters (e.g., pD->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., pD, pCLength ).
- Parameters
-
pCurveId | [ out ] A numeric code representation of an elliptic curve (e.g., CURVE_SECP112R1 for "secp112r1") |
pD | [ inout ] The private key has a BIG Integer value that we represent as a byte stream. 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. |
- 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_PRIVATE. |
P6R::eWrongKeyType | Must be EC |
P6R::eTooSmall | One of the buffers is too small to hold the requested value. |