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:  SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 3.7.0.0 (3.7.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 or sets the 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 propertyPublicKeyAlgorithm
Gets public key algorithm.
Public propertySignatureAlgorithm
Gets resulting signature algorithm identifier.
Public propertySignerCertificate
Gets the certificate associated with the current instance of MessageSigner.
Top
Methods
  NameDescription
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Overrides ObjectFinalize.)
Public methodGetAlgorithmIdentifier
Gets ASN-encoded algorithm identifier based on current configuration.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(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
Returns a string that represents the current object.
(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