CoseMultiSignMessage.SignEmbedded Method

Definition

Overloads

SignEmbedded(Byte[], CoseSigner, CoseHeaderMap, CoseHeaderMap, Byte[])

Signs the specified content and encodes it as a COSE_Sign message with embedded content.

SignEmbedded(ReadOnlySpan<Byte>, CoseSigner, CoseHeaderMap, CoseHeaderMap, ReadOnlySpan<Byte>)

Signs the specified content and encodes it as a COSE_Sign message with detached content.

SignEmbedded(Byte[], CoseSigner, CoseHeaderMap, CoseHeaderMap, Byte[])

Source:
CoseMultiSignMessage.cs
Source:
CoseMultiSignMessage.cs
Source:
CoseMultiSignMessage.cs
Source:
CoseMultiSignMessage.cs
Source:
CoseMultiSignMessage.cs

Signs the specified content and encodes it as a COSE_Sign message with embedded content.

public static byte[] SignEmbedded (byte[] embeddedContent, System.Security.Cryptography.Cose.CoseSigner signer, System.Security.Cryptography.Cose.CoseHeaderMap? protectedHeaders = default, System.Security.Cryptography.Cose.CoseHeaderMap? unprotectedHeaders = default, byte[]? associatedData = default);
static member SignEmbedded : byte[] * System.Security.Cryptography.Cose.CoseSigner * System.Security.Cryptography.Cose.CoseHeaderMap * System.Security.Cryptography.Cose.CoseHeaderMap * byte[] -> byte[]
Public Shared Function SignEmbedded (embeddedContent As Byte(), signer As CoseSigner, Optional protectedHeaders As CoseHeaderMap = Nothing, Optional unprotectedHeaders As CoseHeaderMap = Nothing, Optional associatedData As Byte() = Nothing) As Byte()

Parameters

embeddedContent
Byte[]

The content to sign and to include in the message.

signer
CoseSigner

The signer information used to sign embeddedContent.

protectedHeaders
CoseHeaderMap

The protected header parameters to append to the message's content layer.

unprotectedHeaders
CoseHeaderMap

The unprotected header parameters to append to the message's content layer.

associatedData
Byte[]

The extra data associated with the signature, which must also be provided during verification.

Returns

Byte[]

The encoded message.

Exceptions

embeddedContent or signer is null.

The protectedHeaders and unprotectedHeaders collections have one or more labels in common.

-or-

The ProtectedHeaders and UnprotectedHeaders collections in signer have one or more labels in common.

-or-

One or more of the labels specified in a CriticalHeaders header is missing.

Applies to

SignEmbedded(ReadOnlySpan<Byte>, CoseSigner, CoseHeaderMap, CoseHeaderMap, ReadOnlySpan<Byte>)

Source:
CoseMultiSignMessage.cs
Source:
CoseMultiSignMessage.cs
Source:
CoseMultiSignMessage.cs
Source:
CoseMultiSignMessage.cs
Source:
CoseMultiSignMessage.cs

Signs the specified content and encodes it as a COSE_Sign message with detached content.

public static byte[] SignEmbedded (ReadOnlySpan<byte> embeddedContent, System.Security.Cryptography.Cose.CoseSigner signer, System.Security.Cryptography.Cose.CoseHeaderMap? protectedHeaders = default, System.Security.Cryptography.Cose.CoseHeaderMap? unprotectedHeaders = default, ReadOnlySpan<byte> associatedData = default);
static member SignEmbedded : ReadOnlySpan<byte> * System.Security.Cryptography.Cose.CoseSigner * System.Security.Cryptography.Cose.CoseHeaderMap * System.Security.Cryptography.Cose.CoseHeaderMap * ReadOnlySpan<byte> -> byte[]
Public Shared Function SignEmbedded (embeddedContent As ReadOnlySpan(Of Byte), signer As CoseSigner, Optional protectedHeaders As CoseHeaderMap = Nothing, Optional unprotectedHeaders As CoseHeaderMap = Nothing, Optional associatedData As ReadOnlySpan(Of Byte) = Nothing) As Byte()

Parameters

embeddedContent
ReadOnlySpan<Byte>

The content to sign and to include in the message.

signer
CoseSigner

The signer information used to sign embeddedContent.

protectedHeaders
CoseHeaderMap

The protected header parameters to append to the message's content layer.

unprotectedHeaders
CoseHeaderMap

The unprotected header parameters to append to the message's content layer.

associatedData
ReadOnlySpan<Byte>

The extra data associated with the signature, which must also be provided during verification.

Returns

Byte[]

The encoded message.

Exceptions

signer is null.

The protectedHeaders and unprotectedHeaders collections have one or more labels in common.

-or-

The ProtectedHeaders and UnprotectedHeaders collections in signer have one or more labels in common.

-or-

One or more of the labels specified in a CriticalHeaders header is missing.

Applies to