Class NamedCurveRegistry

java.lang.Object
org.opensaml.security.crypto.ec.NamedCurveRegistry

public class NamedCurveRegistry extends Object
A registry of NamedCurve descriptors.
  • Field Details

  • Constructor Details

    • NamedCurveRegistry

      public NamedCurveRegistry()
      Constructor.
  • Method Details

    • register

      public void register(@Nonnull NamedCurve curve)
      Register a curve.
      Parameters:
      curve - the curve to register
    • deregister

      public void deregister(@Nonnull NamedCurve curve)
      Deregister a curve.
      Parameters:
      curve - the curve to deregister
    • deregisterByOID

      public void deregisterByOID(@Nonnull String oid)
      Deregister a curve.
      Parameters:
      oid - the object identifier (OID) of the curve to deregister
    • deregisterByURI

      public void deregisterByURI(@Nonnull String uri)
      Deregister a curve.
      Parameters:
      uri - the URI
    • deregisterByName

      public void deregisterByName(@Nonnull String name)
      Deregister a curve.
      Parameters:
      name - the curve name
    • deregisterByParameterSpec

      public void deregisterByParameterSpec(@Nonnull ECParameterSpec spec)
      Deregister a curve.
      Parameters:
      spec - the parameter spec instance
    • clear

      public void clear()
      Clear all registered curves.
    • getRegisteredCurves

      @Nonnull @NonnullElements @Unmodifiable @NotLive public Set<NamedCurve> getRegisteredCurves()
      Get a set of all the registered curves.
      Returns:
      the set of registered curves
    • getByOID

      @Nullable public NamedCurve getByOID(@Nonnull String oid)
      Lookup a curve by object identifier (OID).
      Parameters:
      oid - the object identifier
      Returns:
      the NamedCurve instance, or null if no registered curve matched
    • getByURI

      @Nullable public NamedCurve getByURI(@Nonnull String uri)
      Lookup a curve by URI.
      Parameters:
      uri - the URI
      Returns:
      the NamedCurve instance, or null if no registered curve matched
    • getByName

      @Nullable public NamedCurve getByName(@Nonnull String name)
      Lookup a curve by the canonical name by which it is known to the Java Cryptography Architecture (JCA).
      Parameters:
      name - the name
      Returns:
      the NamedCurve instance, or null if no registered curve matched
    • getByParameterSpec

      @Nullable public NamedCurve getByParameterSpec(@Nonnull ECParameterSpec spec)
      Lookup a curve by ECParameterSpec.
      Parameters:
      spec - the parameter spec instance
      Returns:
      the NamedCurve instance, or null if no registered curve matched