ECDsa.TrySignHashCore 方法

定义

尝试为指定的哈希值创建 ECDSA 签名,其格式为提供的缓冲区。

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

参数

hash
ReadOnlySpan<Byte>

要签名的哈希值。

destination
Span<Byte>

要接收签名的缓冲区。

signatureFormat
DSASignatureFormat

用于签名的编码格式。

bytesWritten
Int32

此方法返回时,包含一个值,该值指示写入到 destination的字节数。 此参数被视为未初始化。

返回

true 如果 destination 足够大,无法接收签名,则为 。否则为 false

例外

签名操作中发生错误。

适用于