Class NamedECParameterSpec

java.lang.Object
java.security.spec.ECParameterSpec
de.christofreichardt.json.webkey.NamedECParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec

public class NamedECParameterSpec extends ECParameterSpec
Helper class needed to propagate the identifiers of this curve through serialization and deserialization.
Author:
Christof Reichardt
  • Constructor Details

    • NamedECParameterSpec

      public NamedECParameterSpec(String name, EllipticCurve curve, ECPoint g, BigInteger n, int h)
      Creates elliptic curve domain parameters based on the specified values.
      Parameters:
      name - contains some identifiers for the curve, e.g. "secp256r1 [NIST P-256,X9.62 prime256v1] (1.2.840.10045.3.1.7)"
      curve - the elliptic curve which this parameter defines.
      g - the generator which is also known as the base point.
      n - the order of the generator g.
      h - the cofactor.
      Throws:
      NullPointerException - if curve, g, or n is null.
      IllegalArgumentException - if n or h is not positive.
  • Method Details

    • toString

      public String toString()
      Returns some identifier of the wrapped curve, e.g. "secp256r1 [NIST P-256,X9.62 prime256v1] (1.2.840.10045.3.1.7)"
      Overrides:
      toString in class Object
      Returns:
      the identifiers of the wrapped curve.