Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ISign::setKey ( p6ICryptoKey pKey)
pure virtual

Load the key to be used for either signing or verficiation.

This function can be called multiple times for the same component. Any previously loaded key is freed.

Only the following crypto key types can be used for signing and verification: CKT_RSA, CKT_DSA, CKT_EC, or CKT_SYM. (see p6cyrotokey.h). When using CRT_SYM the same key is used for both signing and verification. RSA, EC, and DSA are public key ciphers and require to sign with the private key and verify with the public key.

Parameters
pKey[ in ] The loaded key to use for signing and signature verification.
Returns
SuccessP6R::eOk 
FailureeInvalidArgpKey is NULL.
eNotInitializedA successful call to initialize was not made before this call.
eWrongKeyTypeOnly the key types listed above can be used for signing.