Show / Hide Table of Contents

Create Method

Create(ReadOnlyMemory<byte>, PivAlgorithm?)

Create a new instance of a PivPublicKey from the given encoded value.

C#
public static PivPublicKey Create(ReadOnlyMemory<byte> encodedPublicKey, PivAlgorithm? algorithm = null)

Parameters

Type Name Description
ReadOnlyMemory<byte> encodedPublicKey

The PIV TLV encoding.

PivAlgorithm? algorithm

Returns

PivPublicKey

An instance of a subclass of PivPublicKey, the actual key represented by the encoding.

Exceptions

Type Condition
ArgumentException

The key data supplied is not a supported encoding.

Remarks

This will return an instance of either PivRsaPublicKey or PivEccPublicKey.

In this article
Back to top Generated by DocFX