Create Method
Create(ReadOnlyMemory<Byte>, out Int32)
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 |
---|---|---|
System.ReadOnlyMemory<System.Byte> | coseEncodedKey | A valid COSE key representation. |
System.Int32 | bytesRead | The method will return the number of bytes read in this argument. |
Returns
A COSE key instance corresponding to the type described by the CBOR data.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
Ctap2DataException | The CBOR reader is not in the correct position. --- or ---The CoseAlgorithmIdentifier could not be determined from the data provided. |
System.NotSupportedException | The CoseAlgorithmIdentifier is not supported by this object representation. |