PivEccPublicKey Constructor
PivEccPublicKey(ReadOnlySpan<Byte>)
Create a new instance of an ECC public key object based on the given point.
C#
public PivEccPublicKey(ReadOnlySpan<byte> publicPoint)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlySpan<System.Byte> | publicPoint | The public point to use to build the object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The format of the public point is not supported. |
Remarks
The point must be provided in the following form
04 || x-coordinate || y-coordinate
each coordinate must be the same size, either 32 bytes (256 bits)
or 48 bytes (384 bits).
Prepend 00 bytes if necessary.
The class will determine the algorithm (PivAlgorithm.EccP256
or PivAlgorithm.EccP384
) based on the size of the point.