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 Map<String,
NamedCurve> Index by name.private Map<String,
NamedCurve> Index by OID.private Map<EnhancedECParameterSpec,
NamedCurve> Index byEnhancedECParameterSpec
.private Map<String,
NamedCurve> Index by URI.private final org.slf4j.Logger
Logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear all registered curves.void
deregister
(NamedCurve curve) Deregister a curve.void
deregisterByName
(String name) Deregister a curve.void
deregisterByOID
(String oid) Deregister a curve.void
Deregister a curve.void
deregisterByURI
(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.void
register
(NamedCurve curve) Register a curve.
-
Field Details
-
log
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
NamedCurve
instance, or null if no registered curve matched
-
getByURI
Lookup a curve by URI.- Parameters:
uri
- the URI- Returns:
- the
NamedCurve
instance, 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
NamedCurve
instance, or null if no registered curve matched
-
getByParameterSpec
Lookup a curve byECParameterSpec
.- Parameters:
spec
- the parameter spec instance- Returns:
- the
NamedCurve
instance, or null if no registered curve matched
-