java.lang.Object
se.swedenconnect.security.algorithms.curves.NamedCurve

public class NamedCurve extends Object
Representation of a named curve.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Constructor Details

    • NamedCurve

      public NamedCurve(String name, String objectIdentifier, int keyLength)
      Constructor.
      Parameters:
      name - the name of the curve
      objectIdentifier - the ASN.1 object identifier (in string format)
      keyLength - the length, in bits, of a key using this curve
  • Method Details

    • getName

      public String getName()
      Gets the name of the curve.
      Returns:
      the name
    • getObjectIdentifier

      public String getObjectIdentifier()
      Gets the string representation for the ASN.1 object identifier of the curve.
      Returns:
      the object identifier
    • getUri

      public String getUri()
      Gets the URI for this curve. This is always "urn:oid:" followed by the object identifier.
      Returns:
      the URI for the curve
    • getKeyLength

      public int getKeyLength()
      Gets the length, in bits, of a key using this curve.
      Returns:
      key length in bits
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object