संपादित करें

इसके माध्यम से साझा किया गया


CoseSign1Message.SignDetached Method

Definition

Overloads

SignDetached(Byte[], CoseSigner, Byte[])

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

SignDetached(Stream, CoseSigner, ReadOnlySpan<Byte>)

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

SignDetached(ReadOnlySpan<Byte>, CoseSigner, ReadOnlySpan<Byte>)

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

SignDetached(Byte[], CoseSigner, Byte[])

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

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

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

Parameters

detachedContent
Byte[]

The content to sign.

signer
CoseSigner

The signer information used to sign detachedContent.

associatedData
Byte[]

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

Returns

Byte[]

The encoded message.

Exceptions

detachedContent or signer is null.

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

SignDetached(Stream, CoseSigner, ReadOnlySpan<Byte>)

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

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

public static byte[] SignDetached (System.IO.Stream detachedContent, System.Security.Cryptography.Cose.CoseSigner signer, ReadOnlySpan<byte> associatedData = default);
static member SignDetached : System.IO.Stream * System.Security.Cryptography.Cose.CoseSigner * ReadOnlySpan<byte> -> byte[]
Public Shared Function SignDetached (detachedContent As Stream, signer As CoseSigner, Optional associatedData As ReadOnlySpan(Of Byte) = Nothing) As Byte()

Parameters

detachedContent
Stream

The content to sign.

signer
CoseSigner

The signer information used to sign detachedContent.

associatedData
ReadOnlySpan<Byte>

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

Returns

Byte[]

The encoded message.

Exceptions

detachedContent or signer is null.

detachedContent does not support reading or seeking.

-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

SignDetached(ReadOnlySpan<Byte>, CoseSigner, ReadOnlySpan<Byte>)

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

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

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

Parameters

detachedContent
ReadOnlySpan<Byte>

The content to sign.

signer
CoseSigner

The signer information used to sign detachedContent.

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 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