Show / Hide Table of Contents

Create Method

Create(ReadOnlyMemory<byte>, PivAlgorithm?)

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

C#
public static PivPrivateKey Create(ReadOnlyMemory<byte> encodedPrivateKey, PivAlgorithm? pivAlgorithm = null)

Parameters

Type Name Description
ReadOnlyMemory<byte> encodedPrivateKey

The PIV TLV encoding.

PivAlgorithm? pivAlgorithm

Returns

PivPrivateKey

An instance of a subclass of PivPrivateKey, 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 PivRsaPrivateKey or PivEccPrivateKey.

In this article
Back to top Generated by DocFX