Edit

Share via


CoseSign1Message.VerifyEmbedded Method

Definition

Overloads

VerifyEmbedded(AsymmetricAlgorithm, Byte[])

Verifies that the signature is valid for the content using the specified key.

VerifyEmbedded(AsymmetricAlgorithm, ReadOnlySpan<Byte>)

Verifies that the signature is valid for the content using the specified key.

VerifyEmbedded(AsymmetricAlgorithm, Byte[])

Source:
CoseSign1Message.cs
Source:
CoseSign1Message.cs
Source:
CoseSign1Message.cs
Source:
CoseSign1Message.cs

Verifies that the signature is valid for the content using the specified key.

public bool VerifyEmbedded (System.Security.Cryptography.AsymmetricAlgorithm key, byte[]? associatedData = default);
member this.VerifyEmbedded : System.Security.Cryptography.AsymmetricAlgorithm * byte[] -> bool
Public Function VerifyEmbedded (key As AsymmetricAlgorithm, Optional associatedData As Byte() = Nothing) As Boolean

Parameters

key
AsymmetricAlgorithm

The public key that is associated with the private key that was used to sign the content.

associatedData
Byte[]

The extra data associated with the signature, which must match the value provided during signing.

Returns

true if the signature is valid; otherwise, false.

Exceptions

key is null.

key is of an unsupported type.

The content is detached from this message, use an overload that accepts a detached content.

ProtectedHeaders does not have a value for the Algorithm header.

-or-

The algorithm protected header was incorrectly formatted.

-or-

The algorithm protected header was not one of the values supported by this implementation.

-or-

The algorithm protected header doesn't match with the algorithms supported by the specified key.

Applies to

VerifyEmbedded(AsymmetricAlgorithm, ReadOnlySpan<Byte>)

Source:
CoseSign1Message.cs
Source:
CoseSign1Message.cs
Source:
CoseSign1Message.cs
Source:
CoseSign1Message.cs

Verifies that the signature is valid for the content using the specified key.

public:
 bool VerifyEmbedded(System::Security::Cryptography::AsymmetricAlgorithm ^ key, ReadOnlySpan<System::Byte> associatedData);
public bool VerifyEmbedded (System.Security.Cryptography.AsymmetricAlgorithm key, ReadOnlySpan<byte> associatedData);
member this.VerifyEmbedded : System.Security.Cryptography.AsymmetricAlgorithm * ReadOnlySpan<byte> -> bool
Public Function VerifyEmbedded (key As AsymmetricAlgorithm, associatedData As ReadOnlySpan(Of Byte)) As Boolean

Parameters

key
AsymmetricAlgorithm

The public key that is associated with the private key that was used to sign the content.

associatedData
ReadOnlySpan<Byte>

The extra data associated with the signature, which must match the value provided during signing.

Returns

true if the signature is valid; otherwise, false.

Exceptions

key is null.

key is of an unsupported type.

The content is detached from this message, use an overload that accepts a detached content.

ProtectedHeaders does not have a value for the Algorithm header.

-or-

The algorithm protected header was incorrectly formatted.

-or-

The algorithm protected header was not one of the values supported by this implementation.

-or-

The algorithm protected header doesn't match with the algorithms supported by the specified key.

Applies to