ECDsa.TrySignDataCore 方法

定義

嘗試以指定的格式,建立指定資料的 ECDSA 簽章,放至提供的緩衝區。

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

參數

data
ReadOnlySpan<Byte>

要雜湊處理和簽章的資料。

destination
Span<Byte>

要接收簽章的緩衝區。

hashAlgorithm
HashAlgorithmName

要用來建立雜湊值的雜湊演算法。

signatureFormat
DSASignatureFormat

要用於簽章的編碼格式。

bytesWritten
Int32

當此方法傳回時,會包含一個值,指出寫入 destination 的位元組數。 這個參數會被視為未初始化。

傳回

destination 夠大可接收輸出,則為 true;否則為 false

例外狀況

簽署作業中發生錯誤。

適用於