ECDsa.TrySignData 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
尝试使用指定的哈希算法和当前密钥将指定的只读字节范围计算到提供的目标的 ECDSA 数字签名。
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>
要签名的数据。
- hashAlgorithm
- HashAlgorithmName
用于对数据进行签名哈希的算法。
- bytesWritten
- Int32
此方法返回时,包含写入 destination到的字节总数。 此参数被视为未初始化。
返回
false 如果 destination 没有足够的时间接收签名,则为