Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ICryptoKey2::getECPrivateKeyASN1 ( P6BOOL  bWithParams,
P6BSTR pASN1 
)
pure virtual

This method retrieves the Eliptical Curve (EC) private key along with its parameters (i.e., named curve) in an ASN.1 (DER) format (see RFC5915).

If the error 'eTooSmall' is returned then one of the pASN1 buffer is too small to hold part of the EC key. In this case the length parameters (i.e., pASN1->length) is assigned the required length.

Parameters
bWithParams[ in ] Generate the ASN.1 with or without the EC key's parameters (e.g., curve name)
pASN1[ inout ] The private key represented in an ASN.1 structure. If pASN1->pString is NULL or too small to hold the key, then the required buffer length to hold the key will be returned in the pASN1->length field and the error eTooSmall is returned.
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedObject is in an incorrect state.
P6R::eInvalidArgpASN1 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.