Show / Hide Table of Contents

IsValidAlgorithmForGenerate Method

IsValidAlgorithmForGenerate(PivAlgorithm)

Determines if the given algorithm is one that can be used to generate a key pair.

C#
[Obsolete("Use algorithm.GetPivKeyDef()?.SupportsKeyGeneration ?? false instead")]
public static bool IsValidAlgorithmForGenerate(this PivAlgorithm algorithm)

Parameters

Type Name Description
PivAlgorithm algorithm

The algorithm name to check.

Returns

bool

A boolean, true if the algorithm is one that can be used to generate a key pair, and false otherwise.

Remarks

The PivAlgorithm enum contains Triple-DES and other algorithms, which cannot be used as an algorithm to generate a key pair. Make sure the given algorithm is one that can be used when generating a key pair.

This also works if checking an algorithm for import, signing, or decrypting/key exchange.

In this article
Back to top Generated by DocFX