Modifica

Condividi tramite


CoseMessage.Encode Method

Definition

Overloads

Encode()

Encodes this message as CBOR.

Encode(Span<Byte>)

Encodes this message as CBOR.

Encode()

Source:
CoseMessage.cs
Source:
CoseMessage.cs
Source:
CoseMessage.cs

Encodes this message as CBOR.

public:
 cli::array <System::Byte> ^ Encode();
public byte[] Encode ();
member this.Encode : unit -> byte[]
Public Function Encode () As Byte()

Returns

Byte[]

The message encoded as CBOR.

Exceptions

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

Applies to

Encode(Span<Byte>)

Source:
CoseMessage.cs
Source:
CoseMessage.cs
Source:
CoseMessage.cs

Encodes this message as CBOR.

public:
 int Encode(Span<System::Byte> destination);
public int Encode (Span<byte> destination);
member this.Encode : Span<byte> -> int
Public Function Encode (destination As Span(Of Byte)) As Integer

Parameters

destination
Span<Byte>

The buffer in which to write the encoded value.

Returns

The number of bytes written to destination.

Exceptions

destination is too small to hold the value.

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

Remarks

Use GetEncodedLength() to determine how many bytes result in encoding this message.

Applies to