IsEcc Method
IsEcc(PivAlgorithm)
Determines if the given algorithm is ECC.
C#
public static bool IsEcc(this PivAlgorithm algorithm)
Parameters
Type | Name | Description |
---|---|---|
PivAlgorithm | algorithm | The algorithm to check. |
Returns
System.Boolean
A boolean, true if the algorithm is ECC, and false otherwise.
Remarks
The PivAlgorithm enum contains EccP256
and EccP384
. But
sometimes you just want to know if an algorithm is ECC or not. It
would seem you would have to write code such as the following.
if ((algorithm == PivAlgorith.EccP256) || (algorithm == PivAlgorithm.ECCP384))
With this extension, you can simply write.
if (algorithm.IsEcc())