ECDsa.TrySignDataCore Method

Definition

Attempts to create the ECDSA signature for the specified data in the indicated format into the provided buffer.

C#
protected virtual bool TrySignDataCore(ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten);

Parameters

data
ReadOnlySpan<Byte>

The data to hash and sign.

destination
Span<Byte>

The buffer to receive the signature.

hashAlgorithm
HashAlgorithmName

The hash algorithm to use to create the hash value.

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

An error occurred in the signing operation.

Applies to

Product Versions
.NET 5, 6, 7, 8, 9, 10