語言

DSA.TrySignData 方法

定義

嘗試將指定資料建立 DSA 簽章到所提供的緩衝區中。

多載

名稱 Description
TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

嘗試將指定資料建立 DSA 簽章到所提供的緩衝區中。

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat, Int32)

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

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

來源:
DSA.cs
來源:
DSA.cs
來源:
DSA.cs
來源:
DSA.cs
來源:
DSA.cs

嘗試將指定資料建立 DSA 簽章到所提供的緩衝區中。

public:
 virtual bool TrySignData(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, [Runtime::InteropServices::Out] int % bytesWritten);
public virtual bool TrySignData(ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten);
abstract member TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
override this.TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
Public Overridable Function TrySignData (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位元組數的值。

傳回

true 若 destination 足夠大以接收結果;否則, false。

適用於

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat, Int32)

來源:
DSA.cs
來源:
DSA.cs
來源:
DSA.cs
來源:
DSA.cs
來源:
DSA.cs

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

public:
 bool TrySignData(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TrySignData(ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten);
member this.TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat * int -> bool
Public Function TrySignData (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。

例外狀況

signatureFormat 不是一個已知的格式。

hashAlgorithm有 a null 或 空。Name

簽署操作發生錯誤。

適用於