संपादित करें

इसके माध्यम से साझा किया गया


ECDsa.SignHash Method

Definition

Overloads

SignHash(Byte[])

Generates a digital signature for the specified hash value.

SignHash(ReadOnlySpan<Byte>)

Computes the ECDSA signature for the specified hash value.

SignHash(Byte[], DSASignatureFormat)

Computes the ECDSA signature for the specified hash value in the indicated format.

SignHash(ReadOnlySpan<Byte>, DSASignatureFormat)

Computes the ECDSA signature for the specified hash value in the indicated format.

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

Computes the ECDSA signature for the specified hash value into the provided buffer.

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

Computes the ECDSA signature for the specified hash value in the indicated format into the provided buffer.

SignHash(Byte[])

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

Generates a digital signature for the specified hash value.

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()

Parameters

hash
Byte[]

The hash value of the data that is being signed.

Returns

Byte[]

A digital signature for the specified hash value.

Exceptions

The hash parameter is null.

Applies to

SignHash(ReadOnlySpan<Byte>)

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

Computes the ECDSA signature for the specified hash value.

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()

Parameters

hash
ReadOnlySpan<Byte>

The hash value of the data that is being signed.

Returns

Byte[]

A digital signature for the specified hash value.

Exceptions

An error occurred in the signing operation.

Remarks

This method will use IeeeP1363FixedFieldConcatenation to encode the the signature. To use a different signature format, use SignHash(ReadOnlySpan<Byte>, DSASignatureFormat).

Applies to

SignHash(Byte[], DSASignatureFormat)

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

Computes the ECDSA signature for the specified hash value in the indicated format.

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()

Parameters

hash
Byte[]

The hash value to sign.

signatureFormat
DSASignatureFormat

The encoding format to use for the signature.

Returns

Byte[]

The ECDSA signature for the specified data.

Exceptions

hash is null.

signatureFormat is not a known format.

An error occurred in the signing operation.

Applies to

SignHash(ReadOnlySpan<Byte>, DSASignatureFormat)

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

Computes the ECDSA signature for the specified hash value in the indicated format.

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()

Parameters

hash
ReadOnlySpan<Byte>

The hash value of the data that is being signed.

signatureFormat
DSASignatureFormat

The encoding format to use for the signature.

Returns

Byte[]

A digital signature for the specified hash value.

Exceptions

signatureFormat is not a known format.

An error occurred in the signing operation.

Applies to

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

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

Computes the ECDSA signature for the specified hash value into the provided buffer.

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

Parameters

hash
ReadOnlySpan<Byte>

The hash value of the data that is being signed.

destination
Span<Byte>

The buffer to receive the signature.

Returns

The total number of bytes written to destination.

Exceptions

An error occurred in the signing operation.

The buffer in destination is too small to hold the signature.

Remarks

This method will use IeeeP1363FixedFieldConcatenation to encode the the signature. To use a different signature format, use SignHash(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat).

Applies to

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

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

Computes the ECDSA signature for the specified hash value in the indicated format into the provided buffer.

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

Parameters

hash
ReadOnlySpan<Byte>

The hash value of the data that is being signed.

destination
Span<Byte>

The buffer to receive the signature.

signatureFormat
DSASignatureFormat

The encoding format to use for the signature.

Returns

The total number of bytes written to destination.

Exceptions

signatureFormat is not a known format.

An error occurred in the signing operation.

The buffer in destination is too small to hold the signature.

Applies to