IsValidAlgorithmForGenerate Method
IsValidAlgorithmForGenerate(PivAlgorithm)
Determines if the given algorithm is one that can be used to generate a key pair.
C#
public static bool IsValidAlgorithmForGenerate(this PivAlgorithm algorithm)
Parameters
Type | Name | Description |
---|---|---|
PivAlgorithm | algorithm | The algorithm name to check. |
Returns
System.Boolean
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.