Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

KeyedHashAlgorithm.Create Method (String)

Creates an instance of the specified implementation of a keyed hash algorithm.

Namespace:  System.Security.Cryptography
Assembly:  mscorlib (in mscorlib.dll)
public static KeyedHashAlgorithm Create(
	string algName
)

Parameters

algName
Type: System.String

The keyed hash algorithm implementation to use. The following table shows the valid values for the algName parameter and the algorithms they map to.

Parameter value

Implements

System.Security.Cryptography.HMAC

HMACSHA1

System.Security.Cryptography.KeyedHashAlgorithm

HMACSHA1

HMACMD5

HMACMD5

System.Security.Cryptography.HMACMD5

HMACMD5

HMACRIPEMD160

HMACRIPEMD160

System.Security.Cryptography.HMACRIPEMD160

HMACRIPEMD160

HMACSHA1

HMACSHA1

System.Security.Cryptography.HMACSHA1

HMACSHA1

HMACSHA256

HMACSHA256

System.Security.Cryptography.HMACSHA256

HMACSHA256

HMACSHA384

HMACSHA384

System.Security.Cryptography.HMACSHA384

HMACSHA384

HMACSHA512

HMACSHA512

System.Security.Cryptography.HMACSHA512

HMACSHA512

MACTripleDES

MACTripleDES

System.Security.Cryptography.MACTripleDES

MACTripleDES

Return Value

Type: System.Security.Cryptography.KeyedHashAlgorithm
A new instance of the specified keyed hash algorithm.

This method supports a number of algorithms, including MD5, SHA-1, SHA-256, and RIPEMD160. For a full list, see the supported values for the algName parameter.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.