APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.org.apache.xml.internal.security.algorithms

public Class JCEMapper

extends Object
Class Inheritance
Imports
java.util.Map, java.util.concurrent.ConcurrentHashMap, com.sun.org.apache.xml.internal.security.signature.XMLSignature, com.sun.org.apache.xml.internal.security.utils.JavaUtils, org.w3c.dom.Element

This class maps algorithm identifier URIs to JAVA JCE class names.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
JCEMapper.Algorithm

Represents the Algorithm xml element

Field Summary

Modifier and TypeField and Description
private static Map<String, JCEMapper.Algorithm>
private static String
private static final Logger
private static final ThreadLocal<String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static JCEMapper.Algorithm

Returns:

The Algorithm object for the given URI.
getAlgorithm
(String algorithmURI)

Method getAlgorithm

public static String

Returns:

the class name that implements this algorithm
getAlgorithmClassFromURI
(String algorithmURI)

Method getAlgorithmClassFromURI

public static int
getIVLengthFromURI(String algorithmURI)

public static String

Returns:

The KeyAlgorithm for the given URI.
getJCEKeyAlgorithmFromURI
(String algorithmURI)

Method getJCEKeyAlgorithmFromURI

public static String

Returns:

The JCEProvider for the given URI.
getJCEProviderFromURI
(String algorithmURI)

Method getJCEProviderFromURI

public static int

Returns:

The length of the key used in the algorithm
getKeyLengthFromURI
(String algorithmURI)

Returns the keylength in bits for a particular algorithm.

public static String

Returns:

the default providerId.
getProviderId
()

Gets the default Provider for obtaining the security algorithms

public static void
register(String id, JCEMapper.Algorithm algorithm)

Method register

public static void
registerDefaultAlgorithms()

This method registers the default algorithms.

public static void
setProviderId(String
the default providerId.
provider
)

Sets the default Provider for obtaining the security algorithms

public static void
setThreadSpecificProviderName(String
the default providerId.
threadSpecificProviderName
)

Sets the default Provider for this thread to obtain the security algorithms

public static String

Returns:

the JCE standard name corresponding to the given URI
translateURItoJCEID
(String algorithmURI)

Method translateURItoJCEID

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

algorithmsMapback to summary
private static Map<String, JCEMapper.Algorithm> algorithmsMap
globalProviderNameback to summary
private static String globalProviderName
LOGback to summary
private static final Logger LOG
threadSpecificProviderNameback to summary
private static final ThreadLocal<String> threadSpecificProviderName

Constructor Detail

JCEMapperback to summary
public JCEMapper()

Method Detail

getAlgorithmback to summary
private static JCEMapper.Algorithm getAlgorithm(String algorithmURI)

Method getAlgorithm

Returns:JCEMapper.Algorithm

The Algorithm object for the given URI.

getAlgorithmClassFromURIback to summary
public static String getAlgorithmClassFromURI(String algorithmURI)

Method getAlgorithmClassFromURI

Returns:String

the class name that implements this algorithm

getIVLengthFromURIback to summary
public static int getIVLengthFromURI(String algorithmURI)
getJCEKeyAlgorithmFromURIback to summary
public static String getJCEKeyAlgorithmFromURI(String algorithmURI)

Method getJCEKeyAlgorithmFromURI

Returns:String

The KeyAlgorithm for the given URI.

getJCEProviderFromURIback to summary
public static String getJCEProviderFromURI(String algorithmURI)

Method getJCEProviderFromURI

Returns:String

The JCEProvider for the given URI.

getKeyLengthFromURIback to summary
public static int getKeyLengthFromURI(String algorithmURI)

Returns the keylength in bits for a particular algorithm.

Returns:int

The length of the key used in the algorithm

getProviderIdback to summary
public static String getProviderId()

Gets the default Provider for obtaining the security algorithms

Returns:String

the default providerId.

registerback to summary
public static void register(String id, JCEMapper.Algorithm algorithm)

Method register

Exceptions
SecurityException:
if a security manager is installed and the caller does not have permission to register the JCE algorithm
registerDefaultAlgorithmsback to summary
public static void registerDefaultAlgorithms()

This method registers the default algorithms.

setProviderIdback to summary
public static void setProviderId(String provider)

Sets the default Provider for obtaining the security algorithms

Parameters
provider:String

the default providerId.

Exceptions
SecurityException:
if a security manager is installed and the caller does not have permission to register the JCE algorithm
setThreadSpecificProviderNameback to summary
public static void setThreadSpecificProviderName(String threadSpecificProviderName)

Sets the default Provider for this thread to obtain the security algorithms

Parameters
threadSpecificProviderName:String

the default providerId.

Exceptions
SecurityException:
if a security manager is installed and the caller does not have permission to register the JCE algorithm
translateURItoJCEIDback to summary
public static String translateURItoJCEID(String algorithmURI)

Method translateURItoJCEID

Returns:String

the JCE standard name corresponding to the given URI

com.sun.org.apache.xml.internal.security.algorithms back to summary

public Class JCEMapper.Algorithm

extends Object
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xml.internal.security.algorithms.JCEMapper.Algorithm

Represents the Algorithm xml element

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final int
pack-priv final String
pack-priv final String
pack-priv final int
pack-priv final String

Constructor Summary

AccessConstructor and Description
public
Algorithm(Element el)

Gets data from element

public
Algorithm(String requiredKey, String jceName)

public
Algorithm(String requiredKey, String jceName, String algorithmClass)

public
Algorithm(String requiredKey, String jceName, int keyLength)

public
Algorithm(String requiredKey, String jceName, String algorithmClass, int keyLength, int ivLength)

public
Algorithm(String requiredKey, String jceName, String algorithmClass, int keyLength, int ivLength, String jceProvider)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

algorithmClassback to summary
pack-priv final String algorithmClass
ivLengthback to summary
pack-priv final int ivLength
jceNameback to summary
pack-priv final String jceName
jceProviderback to summary
pack-priv final String jceProvider
keyLengthback to summary
pack-priv final int keyLength
requiredKeyback to summary
pack-priv final String requiredKey

Constructor Detail

Algorithmback to summary
public Algorithm(Element el)

Gets data from element

Algorithmback to summary
public Algorithm(String requiredKey, String jceName)
Algorithmback to summary
public Algorithm(String requiredKey, String jceName, String algorithmClass)
Algorithmback to summary
public Algorithm(String requiredKey, String jceName, int keyLength)
Algorithmback to summary
public Algorithm(String requiredKey, String jceName, String algorithmClass, int keyLength, int ivLength)
Algorithmback to summary
public Algorithm(String requiredKey, String jceName, String algorithmClass, int keyLength, int ivLength, String jceProvider)