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

定义

尝试将指定数据的 DSA 签名创建到所提供的缓冲区中。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

参数

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

此方法返回时,包含一个指示写入 destination 的字节数的值。When this method returns, contains a value that indicates the number of bytes written to destination.

返回

如果 destination 足够大可以接收结果,则为 true;否则为 falsetrue if destination is large enough to receive the result; otherwise, false.

适用于