Click or drag to resize

MessageSigner Class

Represents the utility which can be used to sign arbitrary data or verify existing signatures by using asymmetric encryption.
Inheritance Hierarchy
SystemObject
  SysadminsLV.PKI.Tools.MessageOperationsMessageSigner

Namespace:  SysadminsLV.PKI.Tools.MessageOperations
Assembly:  PKI.Core (in PKI.Core.dll) Version: 3.3.0.0 (3.3.0.0)
Syntax
public class MessageSigner : IDisposable

The MessageSigner type exposes the following members.

Constructors
  NameDescription
Public methodMessageSigner(X509Certificate2)
Initializes a new instance of the MessageSigner class from signer certificate and default hash algorithm. Default hash algorithm is SHA256.
Public methodMessageSigner(X509Certificate2, Oid2)
Initializes a new instance of the MessageSigner class from signer certificate and client-provided hash algorithm.
Top
Properties
  NameDescription
Public propertyHashingAlgorithm
Gets hashing algorithm that is used to calculate the hash during signing or signature verification processes.
Public propertyPaddingScheme
Gets or sets signature padding scheme for RSA signature creation and validation. Default is PKCS1.
Public propertyPssSaltByteCount
Gets or sets the size, in bytes, of the random salt to use for the PSS padding. Default value matches the hash output length: 16 bytes for MD5, 20 bytes for SHA1, 32 bytes for SHA256, 48 bytes for SHA384 and 64 bytes for SHA512 hashing algorithm.
Public propertySignatureAlgorithm
Gets resulting signature algorithm identifier.
Public propertySignerCertificate
Gets the certificate associated with the current instance of
Top
Methods
  NameDescription
Public methodDispose
Releases all resources used by the MessageSigner
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Overrides ObjectFinalize.)
Public methodGetAlgorithmIdentifier
Gets ASN-encoded algorithm identifier based on current configuration.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodSignData
Signs the data with signer's private key and specified hash algorithm.
Public methodSignHash
Signs the hash with signer's private key.
Public methodToString (Inherited from Object.)
Public methodVerifyData(Byte, Byte)
Verifies that the specified signature matches the specified hash.
Public methodStatic memberVerifyData(SignedContentBlob, PublicKey)
Verifies signature of a signed blob by using specified public key.
Public methodVerifyHash
Verifies that the specified signature matches the specified hash.
Top
Remarks
This class implements IDisposable interface. It is recommended to wrap this class in using statement to automatically release unmanaged resources during signing procedure.
See Also