SignDoc SDK (.NET with exceptions)
5.0.0
|
Interface for creating a PKCS #7 or CAdES signature. More...
Public Member Functions | |
byte[] | sign (Source aSource, bool aDetached, string aHashAlgorithm, TimeStamper aTimeStamper) |
Sign data, producing a PKCS #7 or CAdES signature. More... | |
int | getSignatureSize (bool aDetached, string aHashAlgorithm) |
Compute the size of the signature produced by sign(). More... | |
string | getSubjectCommonName () |
Get the common name (CN) of the certificate's subject. More... | |
string | getErrorMessage () |
Get an error message for the last operation. More... | |
Interface for creating a PKCS #7 or CAdES signature.
Selection of the certificate, including intermediate certifcatse, and implementing CAdES is up to the implementation.
This interface is quite hard to use, please use SignRSA instead.
string 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).
int getSignatureSize | ( | bool | aDetached, |
string | aHashAlgorithm | ||
) |
Compute the size of the signature produced by sign().
[in] | aDetached | true for a detached signature, false for an encapsulated signature. |
[in] | aHashAlgorithm | Hash algorithm to be used for the signature. This parameter also determines the size of encapsulated data (e.g., 20 octets for "SHA-1") if aDetached is false. You might want to ignore this value for ECDSA signatures as it might come from the DigestMethod seed value, which is to be used for RSA only. The following values are defined:
|
string getSubjectCommonName | ( | ) |
Get the common name (CN) of the certificate's subject.
byte [] sign | ( | Source | aSource, |
bool | aDetached, | ||
string | aHashAlgorithm, | ||
TimeStamper | aTimeStamper | ||
) |
Sign data, producing a PKCS #7 or CAdES signature.
[in] | aSource | An object providing data to be hashed and signed. If aDetached is false, all the data shall be encapsulated in the PKCS #7 message. |
[in] | aDetached | true for a detached signature, false for an encapsulated signature. |
[in] | aHashAlgorithm | Hash algorithm to be used for the signature. You might want to ignore this value for ECDSA signatures as it might come from the DigestMethod seed value, which is to be used for RSA only. The following values are defined:
|
[in] | aTimeStamper | Non-null to use a time-stamp server. |