java.lang.Object
java.lang.Enum<GordianSM2Elliptic>
io.github.tonywasher.joceanus.gordianknot.api.keypair.GordianSM2Elliptic
All Implemented Interfaces:
GordianElliptic, Serializable, Comparable<GordianSM2Elliptic>, Constable

public enum GordianSM2Elliptic extends Enum<GordianSM2Elliptic> implements GordianElliptic
Named SM2 Elliptic Curves.
  • Enum Constant Details

  • Method Details

    • values

      public static GordianSM2Elliptic[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GordianSM2Elliptic valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCurveName

      public String getCurveName()
      Description copied from interface: GordianElliptic
      Obtain the name of the curve.
      Specified by:
      getCurveName in interface GordianElliptic
      Returns:
      the name
    • getKeySize

      public int getKeySize()
      Description copied from interface: GordianElliptic
      Obtain the bitSize of the curve.
      Specified by:
      getKeySize in interface GordianElliptic
      Returns:
      the size
    • getCurveForName

      public static GordianSM2Elliptic getCurveForName(String pName)
      Obtain the curve for a Name.
      Parameters:
      pName - the name
      Returns:
      the curve
    • toString

      public String toString()
      Overrides:
      toString in class Enum<GordianSM2Elliptic>
    • hasCustomCurve

      public boolean hasCustomCurve()
      Description copied from interface: GordianElliptic
      Does the curve have a custom implementation?
      Specified by:
      hasCustomCurve in interface GordianElliptic
      Returns:
      true/false