ECDsa.TryHashData 메서드

정의

지정된 해시 알고리즘을 사용하여 지정된 읽기 전용 바이트 범위의 해시 값을 제공된 대상으로 계산하려고 합니다.

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

매개 변수

data
ReadOnlySpan<Byte>

해시할 데이터입니다.

destination
Span<Byte>

해시 값을 받을 버퍼입니다.

hashAlgorithm
HashAlgorithmName

데이터를 해시하는 데 사용하는 알고리즘입니다.

bytesWritten
Int32

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

반환

Boolean

destination이 길지 않아 해시 값을 받을 수 없는 경우 false입니다.

설명

이 메서드의 기본 구현은 결과를 호출 HashData(Byte[], Int32, Int32, HashAlgorithmName) 하고 에 복사하는 것입니다 destination. 파생 형식은 중간 배열 생성을 방지하려면 이 메서드를 재정의해야 합니다.

적용 대상