Show / Hide Table of Contents

Create Method

Create(ReadOnlyMemory<byte>, out int)

Creates the correct COSE key representation based on the CBOR data provided.

C#
public static CoseKey Create(ReadOnlyMemory<byte> coseEncodedKey, out int bytesRead)

Parameters

Type Name Description
ReadOnlyMemory<byte> coseEncodedKey

A valid COSE key representation.

int bytesRead

The method will return the number of bytes read in this argument.

Returns

CoseKey

A COSE key instance corresponding to the type described by the CBOR data.

Exceptions

Type Condition
ArgumentNullException

The coseEncodedKey parameter was null.

Ctap2DataException

The CBOR reader is not in the correct position.

--- or ---

The CoseAlgorithmIdentifier could not be determined from the data provided.

NotSupportedException

The CoseAlgorithmIdentifier is not supported by this object representation.

In this article
Back to top Generated by DocFX