SlhDsa.VerifyData 方法

定义

重载

名称 说明
VerifyData(Byte[], Byte[], Byte[])

验证指定的签名是否对此密钥和所提供的数据有效。

VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

验证指定的签名是否对此密钥和所提供的数据有效。

VerifyData(Byte[], Byte[], Byte[])

Source:
SlhDsa.cs
Source:
SlhDsa.cs
Source:
SlhDsa.cs

验证指定的签名是否对此密钥和所提供的数据有效。

public bool VerifyData(byte[] data, byte[] signature, byte[]? context = default);
member this.VerifyData : byte[] * byte[] * byte[] -> bool
Public Function VerifyData (data As Byte(), signature As Byte(), Optional context As Byte() = Nothing) As Boolean

参数

data
Byte[]

要验证的数据。

signature
Byte[]

要验证的签名。

context
Byte[]

签名期间提供的上下文值。

默认值为 null

返回

true 如果签名验证数据,则为否则,为 false.

例外

datasignaturenull.

context 长度超过 255 字节。

此实例已释放。

验证数据时出错。

注解

null上下文被视为空。

适用于

VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

Source:
SlhDsa.cs
Source:
SlhDsa.cs
Source:
SlhDsa.cs

验证指定的签名是否对此密钥和所提供的数据有效。

public bool VerifyData(ReadOnlySpan<byte> data, ReadOnlySpan<byte> signature, ReadOnlySpan<byte> context = default);
member this.VerifyData : ReadOnlySpan<byte> * ReadOnlySpan<byte> * ReadOnlySpan<byte> -> bool
Public Function VerifyData (data As ReadOnlySpan(Of Byte), signature As ReadOnlySpan(Of Byte), Optional context As ReadOnlySpan(Of Byte) = Nothing) As Boolean

参数

data
ReadOnlySpan<Byte>

要验证的数据。

signature
ReadOnlySpan<Byte>

要验证的签名。

context
ReadOnlySpan<Byte>

签名期间提供的上下文值。

默认值为空缓冲区。

返回

true 如果签名验证数据,则为否则,为 false.

例外

context Length超过 255 个字节。

此实例已释放。

验证数据时出错。

适用于