Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Security.​Cryptography.​X509Certificates.​X509SignatureGenerator

Assembly: System.Security.Cryptography

Inheritance: object → X509SignatureGenerator

Base class for building encoded signatures as needed for X.509 certificates.

Properties

public PublicKey
PublicKey
Gets the public key associated with the private key with which signatures are being generated.

Methods

protected PublicKey
BuildPublicKey​()
When overridden in a derived class, produces the certificate's public key that has the correctly encoded <see cref="T:System.Security.Cryptography.Oid" /> , public key parameters and public key values.
Returns The certificate's public key.
public static X509SignatureGenerator
CreateForCompositeMLDsa​(CompositeMLDsa key)
Creates a signature generator for Composite ML-DSA signatures using the specified key.
Returns An <see cref="T:System.Security.Cryptography.X509Certificates.X509SignatureGenerator" /> object for Composite ML-DSA signatures.
key The private key.
public static X509SignatureGenerator
CreateForECDsa​(ECDsa key)
Creates an <see cref="T:System.Security.Cryptography.X509Certificates.X509SignatureGenerator" /> object for ECDSA signatures using the specified private key.
Returns An <see cref="T:System.Security.Cryptography.X509Certificates.X509SignatureGenerator" /> object for ECDSA signatures.
key The private key.
public static X509SignatureGenerator
CreateForMLDsa​(MLDsa key)
Creates a signature generator for ML-DSA signatures using the specified key.
Returns An <see cref="T:System.Security.Cryptography.X509Certificates.X509SignatureGenerator" /> object for ML-DSA signatures.
key The private key.
public static X509SignatureGenerator
CreateForRSA​(RSA key, RSASignaturePadding signaturePadding)
Creates an <see cref="T:System.Security.Cryptography.X509Certificates.X509SignatureGenerator" /> object for RSA signatures using the specified private key and padding mode.
Returns An <see cref="T:System.Security.Cryptography.X509Certificates.X509SignatureGenerator" /> object for RSA signatures.
key The private key.
signaturePadding The padding mode.
public static X509SignatureGenerator
CreateForSlhDsa​(SlhDsa key)
Creates a signature generator for SLH-DSA signatures using the specified key.
Returns An <see cref="T:System.Security.Cryptography.X509Certificates.X509SignatureGenerator" /> object for SLH-DSA signatures.
key The private key.
public byte[]
GetSignatureAlgorithmIdentifier​(HashAlgorithmName hashAlgorithm)
When overridden in a derived class, encodes the X.509 algorithm identifier for this signature.
Returns The encoded value for the X.509 algorithm identifier.
hashAlgorithm The hash algorithm to use for encoding.
public byte[]
SignData​(byte[] data, HashAlgorithmName hashAlgorithm)
When overridden in a derived class, produces a signature for the specified data using the specified hash algorithm and encodes the results appropriately for X.509 signature values.
Returns The X.509 signature for the specified data.
data The input data for which to produce the signature.
hashAlgorithm The hash algorithm to use to produce the signature.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object