CoseMessage.Encode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Encode() |
Encodes this message as CBOR. |
Encode(Span<Byte>) |
Encodes this message as CBOR. |
Encode()
- 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
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
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
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
.NET