Create Method
Create(ReadOnlyMemory<Byte>)
Create a new instance of a PivPrivateKey from the given encoded value.
C#
public static PivPrivateKey Create(ReadOnlyMemory<byte> encodedPrivateKey)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | encodedPrivateKey | The PIV TLV encoding. |
Returns
An instance of a subclass of PivPrivateKey
, the actual key
represented by the encoding.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The key data supplied is not a supported encoding. |
Remarks
This will return an instance of either PivRsaPrivateKey
or
PivEccPrivateKey
.