PivEccPrivateKey Constructor
PivEccPrivateKey(ReadOnlySpan<Byte>)
Create a new instance of an ECC private key object based on the given private value.
C#
public PivEccPrivateKey(ReadOnlySpan<byte> privateValue)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlySpan<System.Byte> | privateValue | The private value to use to build the object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The size of the private value is not supported by the YubiKey. |
Remarks
The private value will be a "byte array", no tags or length octets.
For PivAlgorithm.EccP256
it must be 32 bytes. For
PivAlgorithm.EccP384
it must be 48 bytes.
The class will determine the algorithm (PivAlgorithm.EccP256
or PivAlgorithm.EccP384
) based on the size of the point.