ECDsa.TrySignHash Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, Int32) |
Attempts to compute the ECDSA digital signature for the specified read-only span of bytes representing a data hash into the provided destination by using the current key. |
TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat, Int32) |
Attempts to create the ECDSA signature for the specified hash value in the indicated format into the provided buffer. |
TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, Int32)
- Source:
- ECDsa.cs
- Source:
- ECDsa.cs
- Source:
- ECDsa.cs
Attempts to compute the ECDSA digital signature for the specified read-only span of bytes representing a data hash into the provided destination by using the current key.
public:
virtual bool TrySignHash(ReadOnlySpan<System::Byte> hash, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public virtual bool TrySignHash (ReadOnlySpan<byte> hash, Span<byte> destination, out int bytesWritten);
abstract member TrySignHash : ReadOnlySpan<byte> * Span<byte> * int -> bool
override this.TrySignHash : ReadOnlySpan<byte> * Span<byte> * int -> bool
Public Overridable Function TrySignHash (hash As ReadOnlySpan(Of Byte), destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean
Parameters
- hash
- ReadOnlySpan<Byte>
The hash value of the data that is being signed.
- bytesWritten
- Int32
When this method returns, the total number of bytes written into destination
. This parameter is treated as uninitialized.
Returns
false
if destination
is not long enough to receive the signature.
Applies to
TrySignHash(ReadOnlySpan<Byte>, Span<Byte>, DSASignatureFormat, Int32)
- Source:
- ECDsa.cs
- Source:
- ECDsa.cs
- Source:
- ECDsa.cs
Attempts to create the ECDSA signature for the specified hash value in the indicated format into the provided buffer.
public:
bool TrySignHash(ReadOnlySpan<System::Byte> hash, Span<System::Byte> destination, System::Security::Cryptography::DSASignatureFormat signatureFormat, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TrySignHash (ReadOnlySpan<byte> hash, Span<byte> destination, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten);
member this.TrySignHash : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.DSASignatureFormat * int -> bool
Public Function TrySignHash (hash As ReadOnlySpan(Of Byte), destination As Span(Of Byte), signatureFormat As DSASignatureFormat, ByRef bytesWritten As Integer) As Boolean
Parameters
- hash
- ReadOnlySpan<Byte>
The hash value to sign.
- signatureFormat
- DSASignatureFormat
The encoding format to use for the signature.
- bytesWritten
- Int32
When this method returns, contains a value that indicates the number of bytes written to destination
. This parameter is treated as uninitialized.
Returns
true
if destination
is big enough to receive the signature; otherwise, false
.
Exceptions
signatureFormat
is not a known format.
An error occurred in the signing operation.