ECDsa.TrySignData 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.
Attempts to compute the ECDSA digital signature for the specified read-only span of bytes into the provided destination by using the specified hashing algorithm and the current key.
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 be signed.
- hashAlgorithm
- HashAlgorithmName
The algorithm to use to hash the data for signing.
- bytesWritten
- Int32
When this method returns, contains 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.