Class JCEMapper
java.lang.Object
org.apache.xml.security.algorithms.JCEMapper
- Direct Known Subclasses:
JCEAlgorithmMapper
This class maps algorithm identifier URIs to JAVA JCE class names.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the Algorithm xml element -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Map<String, JCEMapper.Algorithm> private static final org.slf4j.Loggerprivate static String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static JCEMapper.AlgorithmgetAlgorithm(String algorithmURI) Method getAlgorithmstatic StringgetAlgorithmClassFromURI(String algorithmURI) Method getAlgorithmClassFromURIstatic intgetIVLengthFromURI(String algorithmURI) static StringgetJCEKeyAlgorithmFromURI(String algorithmURI) Method getJCEKeyAlgorithmFromURIstatic StringgetJCEProviderFromURI(String algorithmURI) Method getJCEProviderFromURIstatic intgetKeyLengthFromURI(String algorithmURI) Returns the keylength in bits for a particular algorithm.static StringGets the default Provider for obtaining the security algorithmsstatic voidregister(String id, JCEMapper.Algorithm algorithm) Method registerstatic voidThis method registers the default algorithms.static voidsetProviderId(String provider) Sets the default Provider for obtaining the security algorithmsstatic StringtranslateURItoJCEID(String algorithmURI) Method translateURItoJCEID
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
algorithmsMap
-
providerName
-
-
Constructor Details
-
JCEMapper
public JCEMapper()
-
-
Method Details
-
register
Method register- Parameters:
id-algorithm-- Throws:
SecurityException- if a security manager is installed and the caller does not have permission to register the JCE algorithm
-
registerDefaultAlgorithms
public static void registerDefaultAlgorithms()This method registers the default algorithms. -
translateURItoJCEID
-
getAlgorithmClassFromURI
-
getKeyLengthFromURI
Returns the keylength in bits for a particular algorithm.- Parameters:
algorithmURI-- Returns:
- The length of the key used in the algorithm
-
getIVLengthFromURI
-
getJCEKeyAlgorithmFromURI
-
getJCEProviderFromURI
-
getAlgorithm
Method getAlgorithm- Parameters:
algorithmURI-- Returns:
- The Algorithm object for the given URI.
-
getProviderId
Gets the default Provider for obtaining the security algorithms- Returns:
- the default providerId.
-
setProviderId
Sets the default Provider for obtaining the security algorithms- Parameters:
provider- the default providerId.- Throws:
SecurityException- if a security manager is installed and the caller does not have permission to register the JCE algorithm
-