X509Certificate.TryGetCertHash 메서드

정의

지정된 해시 알고리즘을 통해 인코딩된 인증서 표현을 해시하여 인증서의 “지문”을 생성하려고 합니다.

public:
 virtual bool TryGetCertHash(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public virtual bool TryGetCertHash (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, Span<byte> destination, out int bytesWritten);
abstract member TryGetCertHash : System.Security.Cryptography.HashAlgorithmName * Span<byte> * int -> bool
override this.TryGetCertHash : System.Security.Cryptography.HashAlgorithmName * Span<byte> * int -> bool
Public Overridable Function TryGetCertHash (hashAlgorithm As HashAlgorithmName, destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

매개 변수

hashAlgorithm
HashAlgorithmName

지문에 이용할 알고리즘입니다.

destination
Span<Byte>

인증서 지문을 받을 버퍼입니다.

bytesWritten
Int32

이 메서드가 반환될 경우 destination에 기록되는 총 바이트 수입니다. 이 매개 변수는 초기화되지 않은 것으로 처리됩니다.

반환

Boolean

destination이 해시 값을 받을 수 있을 만큼 길면 true이고, 그렇지 않으면 false입니다.

예외

hashAlgorithm.Namenull 또는 빈 문자열입니다.

hashAlgorithm은 알려진 해시 알고리즘이 아닙니다.

적용 대상

추가 정보