EllipticCurveJsonWebKeyExtensions Class
Converts between an elliptic-curve JSON Web Key and the platform's ECDSA and ECDH types, for the curves this library supports.
public static class EllipticCurveJsonWebKeyExtensionsInheritance System.Object → EllipticCurveJsonWebKeyExtensions
Methods
EllipticCurveJsonWebKeyExtensions.Apply(this EllipticCurveJsonWebKey, ECParameters) Method
Applies Elliptic Curve parameters to an EllipticCurveJsonWebKey.
public static Abblix.Jwt.EllipticCurveJsonWebKey Apply(this Abblix.Jwt.EllipticCurveJsonWebKey jwk, System.Security.Cryptography.ECParameters parameters);Parameters
jwk EllipticCurveJsonWebKey
The EllipticCurveJsonWebKey to which the EC parameters are to be applied.
parameters System.Security.Cryptography.ECParameters
The ECParameters providing the Elliptic Curve key information.
Returns
EllipticCurveJsonWebKey
The updated EllipticCurveJsonWebKey with applied Elliptic Curve parameters.
EllipticCurveJsonWebKeyExtensions.ToEcdh(this EllipticCurveJsonWebKey) Method
Converts an EllipticCurveJsonWebKey to an ECDiffieHellman object for ECDH key agreement operations (e.g. the ECDH-ES family of JWE key management algorithms).
public static System.Security.Cryptography.ECDiffieHellman ToEcdh(this Abblix.Jwt.EllipticCurveJsonWebKey key);Parameters
key EllipticCurveJsonWebKey
The EllipticCurveJsonWebKey to be converted.
Returns
System.Security.Cryptography.ECDiffieHellman
An ECDiffieHellman object based on the provided EllipticCurveJsonWebKey.
EllipticCurveJsonWebKeyExtensions.ToEcdsa(this EllipticCurveJsonWebKey) Method
Converts an EllipticCurveJsonWebKey to an ECDsa object, which represents an ECDSA public and private key pair or just a public key.
public static System.Security.Cryptography.ECDsa ToEcdsa(this Abblix.Jwt.EllipticCurveJsonWebKey key);Parameters
key EllipticCurveJsonWebKey
The EllipticCurveJsonWebKey to be converted.
Returns
System.Security.Cryptography.ECDsa
An ECDsa object based on the provided EllipticCurveJsonWebKey.
EllipticCurveJsonWebKeyExtensions.ToEcParameters(this EllipticCurveJsonWebKey) Method
Converts an EllipticCurveJsonWebKey to ECParameters, which represent the key parameters used in ECDSA cryptographic operations. Supports P-256, P-384, and P-521 curves as defined in NIST standards.
public static System.Security.Cryptography.ECParameters ToEcParameters(this Abblix.Jwt.EllipticCurveJsonWebKey key);Parameters
key EllipticCurveJsonWebKey
The EllipticCurveJsonWebKey to be converted.
Returns
System.Security.Cryptography.ECParameters
An ECParameters object based on the provided EllipticCurveJsonWebKey.
Exceptions
System.InvalidOperationException
Thrown when the curve type is not supported.