Interface for creating an ECDSA signature.
More...
#include <SignDocSDK-cpp.h>
Interface for creating an ECDSA signature.
Selection of the certificate is up to the implementation.
Destructor.
Should release the crypto provider context if one was acquired.
virtual bool getCertificate |
( |
int |
aIndex, |
|
|
std::vector< unsigned char > & |
aOutput |
|
) |
| const |
|
pure virtual |
Get an intermediate certificate.
This function must not throw any exception except for std::bad_alloc.
- Parameters
-
[in] | aIndex | The zero-based index of the intermediate certificate, see getCertificateCount(). |
[out] | aOutput | The requested intermediate certificate will be stored here (DER-encoded X.509). |
- Returns
- true iff successful.
virtual int getCertificateCount |
( |
| ) |
const |
|
pure virtual |
Get the number of available intermediate certificates.
- Returns
- The number of available intermediate certificates.
virtual const char* getErrorMessage |
( |
| ) |
const |
|
pure virtual |
Get an error message for the last operation.
This function must not throw any exception except for std::bad_alloc.
After any member function of this object has been called, you can retrieve an error message by calling this function.
- Returns
- A pointer to the error message. The pointer will become invalid as soon as any member function of this object is called or this object is destroyed.
SIGNDOC_SignECDSA* getImpl |
( |
| ) |
|
|
inline |
virtual int getSignatureSize |
( |
| ) |
|
|
pure virtual |
Get the size of the signature that will be computed by sign().
- Returns
- The size in octets of the signature that will be computed by sign() or a negative value on error.
virtual bool getSigningCertificate |
( |
std::vector< unsigned char > & |
aOutput | ) |
const |
|
pure virtual |
Get the signing certificate.
This function must not throw any exception except for std::bad_alloc.
- Parameters
-
[out] | aOutput | The signing certificate will be stored here (DER-encoded X.509). |
- Returns
- true iff successful.
virtual bool sign |
( |
Source & |
aSource, |
|
|
const char * |
aHashAlgorithm, |
|
|
std::vector< unsigned char > & |
aOutput |
|
) |
| |
|
pure virtual |
Compute an ECDSA signature.
This function must not throw any exception except for std::bad_alloc.
- Parameters
-
[in] | aSource | An object providing data to be hashed and signed. |
[in] | aHashAlgorithm | The hash algorithm to be used for the signature:
- "SHA-1"
- "SHA-224"
- "SHA-256"
- "SHA-384"
- "SHA-512"
|
[out] | aOutput | The ECDSA signature (a DER-encoded SEQUENCE) shall be stored here. It shall not be wrapped in an OCTET STRING. |
- Returns
- true iff successful.
The documentation for this class was generated from the following file: