語言

DSA.TrySignDataCore 方法

定義

嘗試以指定格式建立指定資料的 DSA 簽章,並將其放入提供的緩衝區。

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位元組數的值。 此參數被視為未初始化。

傳回

true 如果 destination 足夠大以接收簽名;否則, false。

例外狀況

簽署操作發生錯誤。

適用於