RsaSecurityKey.GetHashAlgorithmForSignature Method (String)

 

Gets a cryptographic algorithm that generates a hash for a digital signature.

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public override HashAlgorithm GetHashAlgorithmForSignature(
	string algorithm
)

Parameters

algorithm
Type: System.String

The hash algorithm. The supported algorithm is RsaSha1Signature.

Return Value

Type: System.Security.Cryptography.HashAlgorithm

A HashAlgorithm that generates hashes for digital signatures.

Exception Condition
CryptographicException

algorithm is not supported. The supported algorithm is RsaSha1Signature.

.NET Framework
Available since 3.0
Return to top
Show: