Table of Contents

Class SigningAlgorithmResolver

Namespace
SimpleSign.Core.Signing
Assembly
SimpleSign.Core.dll

Resolves one coherent digest, signature OID, and PSS convention for a signing operation.

public static class SigningAlgorithmResolver
Inheritance
SigningAlgorithmResolver
Inherited Members

Methods

Resolve(X509Certificate2, HashAlgorithmName, bool, string?)

Resolves and validates the algorithm selection for a certificate.

public static ResolvedSigningAlgorithm Resolve(X509Certificate2 certificate, HashAlgorithmName configuredHashAlgorithm, bool hashAlgorithmExplicitlySet, string? configuredSignatureAlgorithmOid = null)

Parameters

certificate X509Certificate2

The signing certificate.

configuredHashAlgorithm HashAlgorithmName

The configured hash algorithm.

hashAlgorithmExplicitlySet bool

Whether the caller explicitly selected the hash.

configuredSignatureAlgorithmOid string

An optional signature algorithm OID.

Returns

ResolvedSigningAlgorithm

The coherent algorithm selection to use throughout the operation.

Exceptions

SigningException

The configured selection is incompatible.

TryInferHashFromSignatureOid(string)

Returns the digest encoded by a combined signature OID, if that OID defines one.

public static HashAlgorithmName? TryInferHashFromSignatureOid(string signatureAlgorithmOid)

Parameters

signatureAlgorithmOid string

Returns

HashAlgorithmName?