RSACng.TrySignHash 方法

定義

將簽章寫入提供的緩衝區,嘗試以目前的金鑰簽署雜湊。

public:
 override bool TrySignHash(ReadOnlySpan<System::Byte> hash, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding, [Runtime::InteropServices::Out] int % bytesWritten);
public override bool TrySignHash (ReadOnlySpan<byte> hash, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding, out int bytesWritten);
override this.TrySignHash : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding * int -> bool
Public Overrides Function TrySignHash (hash As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding, ByRef bytesWritten As Integer) As Boolean

參數

hash
ReadOnlySpan<Byte>

要簽署之資料的雜湊值。

destination
Span<Byte>

要接收 RSA 簽章的緩衝區。

hashAlgorithm
HashAlgorithmName

用來建立該資料雜湊值的雜湊演算法。

padding
RSASignaturePadding

填補。

bytesWritten
Int32

當這個方法傳回時,寫入 destination 的位元組總數。 這個參數會被視為未初始化。

傳回

如果 destination 的長度足以接收 RSA 簽章,則為 true;否則為 false

適用於