Package org.opensaml.security.crypto.ec
Class NamedCurveRegistry
java.lang.Object
org.opensaml.security.crypto.ec.NamedCurveRegistry
A registry of
NamedCurve descriptors.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String,NamedCurve> Index by name.private final Map<String,NamedCurve> Index by OID.private final Map<EnhancedECParameterSpec,NamedCurve> Index byEnhancedECParameterSpec.private final Map<String,NamedCurve> Index by URI.private final org.slf4j.LoggerLogger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all registered curves.voidderegister(NamedCurve curve) Deregister a curve.voidderegisterByName(String name) Deregister a curve.voidderegisterByOID(String oid) Deregister a curve.voidDeregister a curve.voidderegisterByURI(String uri) Deregister a curve.Lookup a curve by the canonical name by which it is known to the Java Cryptography Architecture (JCA).Lookup a curve by object identifier (OID).Lookup a curve byECParameterSpec.Lookup a curve by URI.Get a set of all the registered curves.voidregister(NamedCurve curve) Register a curve.
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logLogger. -
byOID
Index by OID. -
byURI
Index by URI. -
byName
Index by name. -
byParamSpec
Index byEnhancedECParameterSpec.
-
-
Constructor Details
-
NamedCurveRegistry
public NamedCurveRegistry()Constructor.
-
-
Method Details
-
register
Register a curve.- Parameters:
curve- the curve to register
-
deregister
Deregister a curve.- Parameters:
curve- the curve to deregister
-
deregisterByOID
Deregister a curve.- Parameters:
oid- the object identifier (OID) of the curve to deregister
-
deregisterByURI
Deregister a curve.- Parameters:
uri- the URI
-
deregisterByName
Deregister a curve.- Parameters:
name- the curve name
-
deregisterByParameterSpec
Deregister a curve.- Parameters:
spec- the parameter spec instance
-
clear
public void clear()Clear all registered curves. -
getRegisteredCurves
Get a set of all the registered curves.- Returns:
- the set of registered curves
-
getByOID
Lookup a curve by object identifier (OID).- Parameters:
oid- the object identifier- Returns:
- the
NamedCurveinstance, or null if no registered curve matched
-
getByURI
Lookup a curve by URI.- Parameters:
uri- the URI- Returns:
- the
NamedCurveinstance, or null if no registered curve matched
-
getByName
Lookup a curve by the canonical name by which it is known to the Java Cryptography Architecture (JCA).- Parameters:
name- the name- Returns:
- the
NamedCurveinstance, or null if no registered curve matched
-
getByParameterSpec
Lookup a curve byECParameterSpec.- Parameters:
spec- the parameter spec instance- Returns:
- the
NamedCurveinstance, or null if no registered curve matched
-