Create Method
Create(ReadOnlyMemory<Byte>)
Create a new instance of a PivPublicKey from the given encoded value.
C#
public static PivPublicKey Create(ReadOnlyMemory<byte> encodedPublicKey)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | encodedPublicKey | The PIV TLV encoding. |
Returns
An instance of a subclass of PivPublicKey
, 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 PivRsaPublicKey
or
PivEccPublicKey
.