Click or drag to resize
ISignPKCS7sign Method
Sign data, producing a PKCS #7 or CAdES signature.

Namespace:  de.softpro.signdocsdk
Assembly:  SPSignDoc_4.3_DotNetLib (in SPSignDoc_4.3_DotNetLib.dll) Version: 1.0.6773.37566
Syntax
C#
byte[] sign(
	ISource source,
	bool detached,
	HashAlgorithm hashAlgorithm,
	TimeStamper timeStamper
)

Parameters

source
Type: de.softpro.signdocsdkISource
An object providing data to be hashed and signed. If @a aDetached is false, all the data shall be encapsulated in the PKCS #7 message.
detached
Type: SystemBoolean
true for a detached signature, false for an encapsulated signature.
hashAlgorithm
Type: de.softpro.signdocsdk.Enums.ESignPKCS7HashAlgorithm
Hash algorithm to be used for signature: #ha_md5, #ha_sha1, #ha_sha224, #ha_sha256, #ha_sha384, #ha_sha512, or #ha_ripemd160. 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.
timeStamper
Type: de.softpro.signdocsdkTimeStamper
Non-null to use a time-stamp server.

Return Value

Type: Byte
The ASN.1-encoded PKCS #7 or CAdES signature or null on error.
See Also