org.apache.xml.security.algorithms
Class JCEMapper

java.lang.Object
  extended by org.apache.xml.security.algorithms.JCEMapper
Direct Known Subclasses:
JCEAlgorithmMapper

public class JCEMapper
extends Object

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


Nested Class Summary
static class JCEMapper.Algorithm
          Represents the Algorithm xml element
 
Constructor Summary
JCEMapper()
           
 
Method Summary
static String getAlgorithmClassFromURI(String algorithmURI)
          Method getAlgorithmClassFromURI
static int getIVLengthFromURI(String algorithmURI)
           
static String getJCEKeyAlgorithmFromURI(String algorithmURI)
          Method getJCEKeyAlgorithmFromURI
static String getJCEProviderFromURI(String algorithmURI)
          Method getJCEProviderFromURI
static int getKeyLengthFromURI(String algorithmURI)
          Returns the keylength in bits for a particular algorithm.
static String getProviderId()
          Gets the default Provider for obtaining the security algorithms
static void register(String id, JCEMapper.Algorithm algorithm)
          Method register
static void registerDefaultAlgorithms()
          This method registers the default algorithms.
static void setProviderId(String provider)
          Sets the default Provider for obtaining the security algorithms
static String translateURItoJCEID(String algorithmURI)
          Method translateURItoJCEID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCEMapper

public JCEMapper()
Method Detail

register

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

Parameters:
id -
algorithm -

registerDefaultAlgorithms

public static void registerDefaultAlgorithms()
This method registers the default algorithms.


translateURItoJCEID

public static String translateURItoJCEID(String algorithmURI)
Method translateURItoJCEID

Parameters:
algorithmURI -
Returns:
the JCE standard name corresponding to the given URI

getAlgorithmClassFromURI

public static String getAlgorithmClassFromURI(String algorithmURI)
Method getAlgorithmClassFromURI

Parameters:
algorithmURI -
Returns:
the class name that implements this algorithm

getKeyLengthFromURI

public static int getKeyLengthFromURI(String algorithmURI)
Returns the keylength in bits for a particular algorithm.

Parameters:
algorithmURI -
Returns:
The length of the key used in the algorithm

getIVLengthFromURI

public static int getIVLengthFromURI(String algorithmURI)

getJCEKeyAlgorithmFromURI

public static String getJCEKeyAlgorithmFromURI(String algorithmURI)
Method getJCEKeyAlgorithmFromURI

Parameters:
algorithmURI -
Returns:
The KeyAlgorithm for the given URI.

getJCEProviderFromURI

public static String getJCEProviderFromURI(String algorithmURI)
Method getJCEProviderFromURI

Parameters:
algorithmURI -
Returns:
The JCEProvider for the given URI.

getProviderId

public static String getProviderId()
Gets the default Provider for obtaining the security algorithms

Returns:
the default providerId.

setProviderId

public static void setProviderId(String provider)
Sets the default Provider for obtaining the security algorithms

Parameters:
provider - the default providerId.


Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.