ECDsa.SignHash 方法

定义

重载

名称 说明
SignHash(Byte[])

为指定的哈希值生成数字签名。

SignHash(ReadOnlySpan<Byte>)

计算指定哈希值的 ECDSA 签名。

SignHash(Byte[], DSASignatureFormat)

以指示格式计算指定哈希值的 ECDSA 签名。

SignHash(ReadOnlySpan<Byte>, DSASignatureFormat)

以指示格式计算指定哈希值的 ECDSA 签名。

SignHash(ReadOnlySpan<Byte>, Span<Byte>)

将指定哈希值的 ECDSA 签名计算到提供的缓冲区中。

SignHash(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat)

将指定哈希值的 ECDSA 签名(以指示的格式)计算到提供的缓冲区中。

SignHash(Byte[])

Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs

为指定的哈希值生成数字签名。

public:
 abstract cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash);
public abstract byte[] SignHash(byte[] hash);
abstract member SignHash : byte[] -> byte[]
Public MustOverride Function SignHash (hash As Byte()) As Byte()

参数

hash
Byte[]

正在签名的数据的哈希值。

返回

Byte[]

指定哈希值的数字签名。

例外

参数 hashnull.

适用于

SignHash(ReadOnlySpan<Byte>)

Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs

计算指定哈希值的 ECDSA 签名。

public:
 cli::array <System::Byte> ^ SignHash(ReadOnlySpan<System::Byte> hash);
public byte[] SignHash(ReadOnlySpan<byte> hash);
member this.SignHash : ReadOnlySpan<byte> -> byte[]
Public Function SignHash (hash As ReadOnlySpan(Of Byte)) As Byte()

参数

hash
ReadOnlySpan<Byte>

正在签名的数据的哈希值。

返回

Byte[]

指定哈希值的数字签名。

例外

签名操作中发生错误。

注解

此方法将用于 IeeeP1363FixedFieldConcatenation 对签名进行编码。 若要使用不同的签名格式,请使用 SignHash(ReadOnlySpan<Byte>, DSASignatureFormat)

另请参阅

适用于

SignHash(Byte[], DSASignatureFormat)

Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs

以指示格式计算指定哈希值的 ECDSA 签名。

public:
 cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash, System::Security::Cryptography::DSASignatureFormat signatureFormat);
public byte[] SignHash(byte[] hash, System.Security.Cryptography.DSASignatureFormat signatureFormat);
member this.SignHash : byte[] * System.Security.Cryptography.DSASignatureFormat -> byte[]
Public Function SignHash (hash As Byte(), signatureFormat As DSASignatureFormat) As Byte()

参数

hash
Byte[]

要签名的哈希值。

signatureFormat
DSASignatureFormat

用于签名的编码格式。

返回

Byte[]

指定数据的 ECDSA 签名。

例外

hashnull

signatureFormat 不是已知格式。

签名操作中发生错误。

适用于

SignHash(ReadOnlySpan<Byte>, DSASignatureFormat)

Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs

以指示格式计算指定哈希值的 ECDSA 签名。

public:
 cli::array <System::Byte> ^ SignHash(ReadOnlySpan<System::Byte> hash, System::Security::Cryptography::DSASignatureFormat signatureFormat);
public byte[] SignHash(ReadOnlySpan<byte> hash, System.Security.Cryptography.DSASignatureFormat signatureFormat);
member this.SignHash : ReadOnlySpan<byte> * System.Security.Cryptography.DSASignatureFormat -> byte[]
Public Function SignHash (hash As ReadOnlySpan(Of Byte), signatureFormat As DSASignatureFormat) As Byte()

参数

hash
ReadOnlySpan<Byte>

正在签名的数据的哈希值。

signatureFormat
DSASignatureFormat

用于签名的编码格式。

返回

Byte[]

指定哈希值的数字签名。

例外

signatureFormat 不是已知格式。

签名操作中发生错误。

另请参阅

适用于

SignHash(ReadOnlySpan<Byte>, Span<Byte>)

Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs

将指定哈希值的 ECDSA 签名计算到提供的缓冲区中。

public:
 int SignHash(ReadOnlySpan<System::Byte> hash, Span<System::Byte> destination);
public int SignHash(ReadOnlySpan<byte> hash, Span<byte> destination);
member this.SignHash : ReadOnlySpan<byte> * Span<byte> -> int
Public Function SignHash (hash As ReadOnlySpan(Of Byte), destination As Span(Of Byte)) As Integer

参数

hash
ReadOnlySpan<Byte>

正在签名的数据的哈希值。

destination
Span<Byte>

要接收签名的缓冲区。

返回

写入到 destination的字节总数。

例外

签名操作中发生错误。

缓冲区 destination 太小,无法保存签名。

注解

此方法将用于 IeeeP1363FixedFieldConcatenation 对签名进行编码。 若要使用不同的签名格式,请使用 SignHash(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat)

另请参阅

适用于

SignHash(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat)

Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs
Source:
ECDsa.cs

将指定哈希值的 ECDSA 签名(以指示的格式)计算到提供的缓冲区中。

public:
 int SignHash(ReadOnlySpan<System::Byte> hash, Span<System::Byte> destination, System::Security::Cryptography::DSASignatureFormat signatureFormat);
public int SignHash(ReadOnlySpan<byte> hash, Span<byte> destination, System.Security.Cryptography.DSASignatureFormat signatureFormat);
member this.SignHash : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.DSASignatureFormat -> int
Public Function SignHash (hash As ReadOnlySpan(Of Byte), destination As Span(Of Byte), signatureFormat As DSASignatureFormat) As Integer

参数

hash
ReadOnlySpan<Byte>

正在签名的数据的哈希值。

destination
Span<Byte>

要接收签名的缓冲区。

signatureFormat
DSASignatureFormat

用于签名的编码格式。

返回

写入到 destination的字节总数。

例外

signatureFormat 不是已知格式。

签名操作中发生错误。

缓冲区 destination 太小,无法保存签名。

另请参阅

适用于