IncrementalHash.CreateHMAC 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
CreateHMAC(HashAlgorithmName, Byte[]) |
지정한 해시 알고리즘 및 키를 사용하여 HMAC(해시 기반 메시지 인증 코드) 알고리즘에 대한 IncrementalHash를 만듭니다. |
CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>) |
|
CreateHMAC(HashAlgorithmName, Byte[])
- Source:
- IncrementalHash.cs
- Source:
- IncrementalHash.cs
- Source:
- IncrementalHash.cs
지정한 해시 알고리즘 및 키를 사용하여 HMAC(해시 기반 메시지 인증 코드) 알고리즘에 대한 IncrementalHash를 만듭니다.
public:
static System::Security::Cryptography::IncrementalHash ^ CreateHMAC(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ key);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key);
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * byte[] -> System.Security.Cryptography.IncrementalHash
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * byte[] -> System.Security.Cryptography.IncrementalHash
Public Shared Function CreateHMAC (hashAlgorithm As HashAlgorithmName, key As Byte()) As IncrementalHash
매개 변수
- hashAlgorithm
- HashAlgorithmName
HMAC 내에서 수행하는 해시 알고리즘의 이름입니다.
- key
- Byte[]
HMAC에 대한 비밀 키입니다. 키는 길이 제한이 없지만, 지정한 해시 알고리즘의 출력 크기보다 긴 키는 올바른 크기의 키를 파생하기 위해 해시됩니다. 따라서 비밀 키의 권장되는 크기는 지정한 해시 알고리즘의 출력 크기입니다.
반환
지정한 해시 알고리즘을 컴퓨팅할 준비가 된 IncrementalHash 클래스의 인스턴스입니다.
- 특성
예외
key
은 null
입니다.
hashAlgorithm
.Name이 null
또는 빈 문자열입니다.
hashAlgorithm
은 알려진 해시 알고리즘이 아닙니다.
적용 대상
CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)
- Source:
- IncrementalHash.cs
- Source:
- IncrementalHash.cs
- Source:
- IncrementalHash.cs
hashAlgorithm
으로 지정된 해시 알고리즘과 key
로 지정된 키를 사용하여 HMAC(해시 기반 메시지 인증 코드) 알고리즘에 대한 IncrementalHash를 만듭니다.
public:
static System::Security::Cryptography::IncrementalHash ^ CreateHMAC(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> key);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> -> System.Security.Cryptography.IncrementalHash
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> -> System.Security.Cryptography.IncrementalHash
Public Shared Function CreateHMAC (hashAlgorithm As HashAlgorithmName, key As ReadOnlySpan(Of Byte)) As IncrementalHash
매개 변수
- hashAlgorithm
- HashAlgorithmName
HMAC 내에서 수행하는 해시 알고리즘의 이름입니다.
- key
- ReadOnlySpan<Byte>
HMAC에 대한 비밀 키입니다. 키의 길이는 제한이 없지만 hashAlgorithm
으로 지정된 해시 알고리즘의 출력 크기보다 긴 키는 hashAlgorithm
으로 지정된 알고리즘을 사용하여 해시되어 올바른 크기의 키를 파생시킵니다. 따라서 비밀 키의 권장되는 크기는 hashAlgorithm
으로 지정된 해시의 출력 크기입니다.
반환
hashAlgorithm
에 의해 지정된 해시 알고리즘을 컴퓨팅하기 위한 해시 인스턴스입니다.
- 특성
예외
hashAlgorithm
.Name 가 null
또는 빈 문자열입니다.
hashAlgorithm
은 알려진 해시 알고리즘이 아닙니다.
적용 대상
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기