Interface for creating an ECDSA signature. More...
#include <SignDocSDK-cpp.h>
Public Types | |
enum | HashAlgorithm { ha_sha1 = 1, ha_sha256 = 2, ha_sha384 = 3, ha_sha512 = 4, ha_sha224 = 7 } |
Hash algorithm. More... | |
Public Member Functions | |
SignECDSA () | |
Constructor. | |
virtual | ~SignECDSA () |
Destructor. | |
virtual bool | sign (Source &aSource, HashAlgorithm aHashAlgorithm, std::vector< unsigned char > &aOutput)=0 |
Compute an ECDSA signature. | |
virtual int | getSignatureSize ()=0 |
Get the size of the signature that will be computed by sign(). | |
virtual bool | getSigningCertificate (std::vector< unsigned char > &aOutput) const =0 |
Get the signing certificate. | |
virtual int | getCertificateCount () const =0 |
Get the number of available intermediate certificates. | |
virtual bool | getCertificate (int aIndex, std::vector< unsigned char > &aOutput) const =0 |
Get an intermediate certificate. | |
virtual const char * | getErrorMessage () const =0 |
Get an error message for the last operation. | |
SIGNDOC_SignECDSA * | getImpl () |
Internal. |
Interface for creating an ECDSA signature.
Selection of the certificate is up to the implementation.
de::softpro::doc::SignECDSA::SignECDSA | ( | ) | [inline] |
Constructor.
virtual de::softpro::doc::SignECDSA::~SignECDSA | ( | ) | [inline, virtual] |
Destructor.
Should release the crypto provider context if one was acquired.
virtual bool de::softpro::doc::SignECDSA::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.
[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). |
virtual int de::softpro::doc::SignECDSA::getCertificateCount | ( | ) | const [pure virtual] |
Get the number of available intermediate certificates.
virtual const char* de::softpro::doc::SignECDSA::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.
SIGNDOC_SignECDSA* de::softpro::doc::SignECDSA::getImpl | ( | ) | [inline] |
Internal.
virtual int de::softpro::doc::SignECDSA::getSignatureSize | ( | ) | [pure virtual] |
virtual bool de::softpro::doc::SignECDSA::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.
[out] | aOutput | The signing certificate will be stored here (DER-encoded X.509). |
virtual bool de::softpro::doc::SignECDSA::sign | ( | Source & | aSource, |
HashAlgorithm | aHashAlgorithm, | ||
std::vector< unsigned char > & | aOutput | ||
) | [pure virtual] |
Compute an ECDSA signature.
This function must not throw any exception except for std::bad_alloc.
[in] | aSource | An object providing data to be hashed and signed. |
[in] | aHashAlgorithm | Hash algorithm. |
[out] | aOutput | The ECDSA signature (a DER-encoded SEQUENCE) shall be stored here. It shall not be wrapped in an OCTET STRING. |