HMAC.Create 메서드

정의

해시 기반 메시지 인증 코드(HMAC)의 구현 인스턴스를 만듭니다.

오버로드

Create()
사용되지 않습니다.
사용되지 않습니다.

HMAC(해시 기반 메시지 인증 코드)의 기본 구현 인스턴스를 만듭니다.

Create(String)

HMAC(해시 기반 메시지 인증 코드)의 지정된 구현 인스턴스를 만듭니다.

Create()

주의

The default implementation of this cryptography algorithm is not supported

주의

The default implementation of this cryptography algorithm is not supported.

HMAC(해시 기반 메시지 인증 코드)의 기본 구현 인스턴스를 만듭니다.

public:
 static System::Security::Cryptography::HMAC ^ Create();
[System.Obsolete("The default implementation of this cryptography algorithm is not supported", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.HMAC Create ();
[System.Obsolete("The default implementation of this cryptography algorithm is not supported.", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.HMAC Create ();
public static System.Security.Cryptography.HMAC Create ();
[<System.Obsolete("The default implementation of this cryptography algorithm is not supported", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member Create : unit -> System.Security.Cryptography.HMAC
[<System.Obsolete("The default implementation of this cryptography algorithm is not supported.", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member Create : unit -> System.Security.Cryptography.HMAC
static member Create : unit -> System.Security.Cryptography.HMAC
Public Shared Function Create () As HMAC

반환

HMAC

기본 설정이 <cryptoClass> 요소를 사용하여 변경되지 않는 한 새로운 SHA-1 인스턴스입니다.

특성

예외

.NET Core 2.0 - 3.1 및 .NET 5 이상: 모든 경우에.

설명

이 메서드는 .NET 5 이상 버전에서 사용되지 않습니다.

기본적으로 이 오버로드는 HMAC의 SHA-1 구현을 사용합니다. 다른 구현을 지정하려면 대신 알고리즘 이름을 지정할 수 있는 오버로드를 사용합니다 Create(String) .

SHA-1과의 충돌 문제로 인해 Microsoft는 SHA-256 이상에 기반한 보안 모델을 권장합니다.

적용 대상

Create(String)

HMAC(해시 기반 메시지 인증 코드)의 지정된 구현 인스턴스를 만듭니다.

public:
 static System::Security::Cryptography::HMAC ^ Create(System::String ^ algorithmName);
public static System.Security.Cryptography.HMAC? Create (string algorithmName);
public static System.Security.Cryptography.HMAC Create (string algorithmName);
static member Create : string -> System.Security.Cryptography.HMAC
Public Shared Function Create (algorithmName As String) As HMAC

매개 변수

algorithmName
String

사용할 HMAC 구현입니다. 다음 표에서는 algorithmName 매개 변수의 올바른 값과 매핑할 알고리즘을 보여 줍니다.

매개 변수 값 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

반환

HMAC

지정된 HMAC 구현의 새 인스턴스입니다.

설명

HMAC는 MD5, SHA-1, SHA-256 및 RIPEMD160을 비롯한 다양한 해시 알고리즘을 지원합니다. 전체 목록은 매개 변수에 대해 지원되는 값을 참조하세요 algorithmName .

MD5 및 SHA-1의 충돌 문제로 인해 MICROSOFT는 SHA-256 이상에 기반한 보안 모델을 권장합니다.

적용 대상