DSA.TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32) Method

Definition

Attempts to create the DSA signature for the specified data into the provided buffer.

public:
 virtual bool TrySignData(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, [Runtime::InteropServices::Out] int % bytesWritten);
public virtual bool TrySignData (ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten);
abstract member TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
override this.TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
Public Overridable Function TrySignData (data As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, ByRef bytesWritten As Integer) As Boolean

Parameters

data
ReadOnlySpan<Byte>

The data to hash and sign.

destination
Span<Byte>

The byte span to receive the signature.

hashAlgorithm
HashAlgorithmName

The name of the hash algorithm to use.

bytesWritten
Int32

When this method returns, contains a value that indicates the number of bytes written to destination.

Returns

true if destination is large enough to receive the result; otherwise, false.

Applies to