Table of Contents

Class EcdsaSignatureFormatter

Namespace
Fdyay.IdentityServer.Saml.Xml
Assembly
Fdyay.IdentityServer.Saml.dll

Signs an already-computed hash with an ECDsa key.

public sealed class EcdsaSignatureFormatter : AsymmetricSignatureFormatter
Inheritance
EcdsaSignatureFormatter
Inherited Members

Remarks

The signature is the r‖s pair of fixed-width field elements (IEEE P1363), which is what RFC 4051 fixes for ECDSA in XML signatures and what SignHash(byte[]) produces. It is the same encoding the redirect binding uses, so the two paths agree about what a signature is.

Methods

CreateSignature(byte[])

When overridden in a derived class, creates the signature for the specified data.

public override byte[] CreateSignature(byte[] rgbHash)

Parameters

rgbHash byte[]

The data to be signed.

Returns

byte[]

The digital signature for the rgbHash parameter.

SetHashAlgorithm(string)

When overridden in a derived class, sets the hash algorithm to use for creating the signature.

public override void SetHashAlgorithm(string strName)

Parameters

strName string

The name of the hash algorithm to use for creating the signature.

Remarks

Ignored: the hash is fixed by which description created this formatter, and a caller naming a different one is naming something this instance cannot do. Accepting it silently would be the mismatch the description exists to prevent.

SetKey(AsymmetricAlgorithm)

When overridden in a derived class, sets the asymmetric algorithm to use to create the signature.

public override void SetKey(AsymmetricAlgorithm key)

Parameters

key AsymmetricAlgorithm

The instance of the implementation of AsymmetricAlgorithm to use to create the signature.