Public Member Functions | Static Public Attributes

de.softpro.doc.SignECDSA Interface Reference

Interface for creating an ECDSA signature. More...

List of all members.

Public Member Functions

byte[] sign (Source aSource, int aHashAlgorithm)
 Compute an ECDSA signature.
int getSignatureSize ()
 Get the size of the signature that will be computed by sign().
byte[] getSigningCertificate ()
 Get the signing certificate.
int getCertificateCount ()
 Get the number of available intermediate certificates.
byte[] getCertificate (int aIndex)
 Get an intermediate certificate.
String getErrorMessage ()
 Get an error message for the last operation.

Static Public Attributes

static final int ha_sha1 = 1
 Hash algorithm: SHA-1.
static final int ha_sha256 = 2
 Hash algorithm: SHA-256.
static final int ha_sha384 = 3
 Hash algorithm: SHA-384.
static final int ha_sha512 = 4
 Hash algorithm: SHA-512.
static final int ha_sha224 = 7
 Hash algorithm: SHA-224.

Detailed Description

Interface for creating an ECDSA signature.

Selection of the certificate is up to the implementation.


Member Function Documentation

byte [] de.softpro.doc.SignECDSA.getCertificate ( int  aIndex )

Get an intermediate certificate.

Parameters:
[in]aIndexThe zero-based index of the intermediate certificate, see getCertificateCount().
Returns:
The requested intermediate certificate (DER-encoded X.509) or null on error.
int de.softpro.doc.SignECDSA.getCertificateCount (  )

Get the number of available intermediate certificates.

Returns:
The number of available intermediate certificates.
String de.softpro.doc.SignECDSA.getErrorMessage (  )

Get an error message for the last operation.

After any method of this object has been called, this function shall return an error message (possibly empty if the most recently called method didn't fail).

Returns:
An error message (possibly empty if the last operation succeeded).
int de.softpro.doc.SignECDSA.getSignatureSize (  )

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.
byte [] de.softpro.doc.SignECDSA.getSigningCertificate (  )

Get the signing certificate.

Returns:
The signing certificate (DER-encoded X.509) or null on error.
byte [] de.softpro.doc.SignECDSA.sign ( Source  aSource,
int  aHashAlgorithm 
)

Compute an ECDSA signature.

Parameters:
[in]aSourceAn object providing data to be hashed and signed.
[in]aHashAlgorithmHash algorithm (ha_sha1, ha_sha224, ha_sha256, ha_sha384, or ha_sha512).
Returns:
The ECDSA signature (a DER-encoded SEQUENCE). It shall not be wrapped in an OCTET STRING.

Member Data Documentation

final int de.softpro.doc.SignECDSA.ha_sha1 = 1 [static]

Hash algorithm: SHA-1.

final int de.softpro.doc.SignECDSA.ha_sha224 = 7 [static]

Hash algorithm: SHA-224.

final int de.softpro.doc.SignECDSA.ha_sha256 = 2 [static]

Hash algorithm: SHA-256.

final int de.softpro.doc.SignECDSA.ha_sha384 = 3 [static]

Hash algorithm: SHA-384.

final int de.softpro.doc.SignECDSA.ha_sha512 = 4 [static]

Hash algorithm: SHA-512.


The documentation for this interface was generated from the following file: