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
)
Public Function Sign (
messageSigner As MessageSigner,
content As Byte()
) As PkcsSignerInfo
public:
PkcsSignerInfo^ Sign(
MessageSigner^ messageSigner,
array<unsigned char>^ content
)
member Sign :
messageSigner : MessageSigner *
content : byte[] -> PkcsSignerInfo
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:
PkcsSignerInfoSigned signer info that can be added to signed CMS message.
Exceptions Exception | Condition |
---|
ArgumentNullException | messageSigner parameter is null.
|
ArgumentException | Message 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