Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ICryptoKey2::getECPrivateKey ( P6ECCURVE pCurveId,
P6BSTR pD 
)
pure virtual

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