CoseMessage.Encode Method
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.
Encode() |
Encodes this message as CBOR. |
Encode(Span<Byte>) |
Encodes this message as CBOR. |
- 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
The message encoded as CBOR.
Exceptions
The ProtectedHeaders and UnprotectedHeaders collections have one or more labels in common.
Applies to
.NET 9 (package-provided) and other versions
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- 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
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 9 (package-provided) and other versions
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: