SignDoc SDK (.NET with exceptions)  5.0.0
SignRSA Interface Reference

Interface for creating an RSA signature. More...

Public Member Functions

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

Detailed Description

Interface for creating an RSA signature.

Selection of the certificate is up to the implementation.

Member Function Documentation

byte [] 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.
Note
The WinRT component returns null instead of an empty blob.
int getCertificateCount ( )

Get the number of available intermediate certificates.

Returns
The number of available intermediate certificates.
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).

Returns
An error message (possibly empty if the last operation succeeded).
int 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() (ie, the size of the private key in octets) or a negative value on error.
byte [] getSigningCertificate ( )

Get the signing certificate.

Returns
The signing certificate (DER-encoded X.509) or null on error.
Note
The WinRT component returns null instead of an empty blob.
byte [] sign ( Source  aSource,
string  aSignatureScheme,
string  aHashAlgorithm,
int  aSaltLength 
)

Compute an RSA signature.

Parameters
[in]aSourceAn object providing data to be hashed and signed.
[in]aSignatureSchemeThe RSA signature scheme:
  • "PKCS1": PKCS #1 1.5.
  • "PSS": RSASSA-PSS (RSA 2.0), see also aHashAlgorithm and aSaltLength
[in]aHashAlgorithmThe Hash algorithm to be used for the signature and (for RSASSA-PSS) for mask generation:
  • "SHA-1"
  • "SHA-256"
  • "SHA-384"
  • "SHA-512"
  • "RIPEMD-160"
[in]aSaltLengthThe salt length (in octets) for RSASSA-PSS, to be ignored for the PKCS #1 signature scheme.
Returns
The RSA signature. This shall be just the result of the RSA operation, not wrapped in an OCTET STRING.

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