CoseEcPublicKey Constructor
CoseEcPublicKey(CoseEcCurve, ReadOnlyMemory<Byte>, ReadOnlyMemory<Byte>)
Construct a CoseEcPublicKey based on the curve and point.
public CoseEcPublicKey(CoseEcCurve curve, ReadOnlyMemory<byte> xCoordinate, ReadOnlyMemory<byte> yCoordinate)
Parameters
Type | Name | Description |
---|---|---|
CoseEcCurve | curve | The curve for this public key. |
System.ReadOnlyMemory<System.Byte> | xCoordinate | The x-coordinate of the public point. |
System.ReadOnlyMemory<System.Byte> | yCoordinate | The y-coordinate of the public point. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The |
Remarks
An ECC public key is a curve and public point. This class supports
only one curve: NIST P-256 (CoseEcCurve.P256
). This
constructor expects the length of each coordinate to be at least one
byte and 32 bytes or fewer.
CoseEcPublicKey(ReadOnlyMemory<Byte>)
Construct a CoseEcPublicKey based on the CBOR encoding
of a COSE_Key
.
public CoseEcPublicKey(ReadOnlyMemory<byte> encodedCoseKey)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | encodedCoseKey | The CBOR encoding. |
Exceptions
Type | Condition |
---|---|
Ctap2DataException | The |
CoseEcPublicKey(ECParameters)
Construct a CoseEcPublicKey based on .NET elliptic curve parameters.
public CoseEcPublicKey(ECParameters ecParameters)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Cryptography.ECParameters | ecParameters | An |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The |
System.NotSupportedException | The parameters/public key specified is not supported. |