Click or drag to resize

PkcsSignerInfoBuilderSign Method

Signs authenticated attributes.

Namespace:  SysadminsLV.PKI.Cryptography.Pkcs
Assembly:  SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 3.7.0.0 (3.7.0.0)
Syntax
public PkcsSignerInfo Sign(
	MessageSigner messageSigner,
	byte[] content
)

Parameters

messageSigner
Type: SysadminsLV.PKI.Tools.MessageOperationsMessageSigner
Signer certificate to use in signing operations.
content
Type: SystemByte
An optional content to sign. This parameter can be null if AuthenticatedAttributes contain Message Digest attribute. If this attribute is not presented, content parameter cannot be null.

Return Value

Type: PkcsSignerInfo
Signed signer info that can be added to signed CMS message.
Exceptions
ExceptionCondition
ArgumentNullExceptionmessageSigner parameter is null.
ArgumentExceptionMessage Digest attribute is missing and no content provided to sign.
CryptographicException Signer certificate is configured to use PSS padding for signature which is not supported.
See Also