@SuppressWarnings("unchecked") public static void register(String algorithmURI,String implementingClass) throws AlgorithmAlreadyRegisteredException, ClassNotFoundException, XMLSignatureException {
  JavaUtils.checkRegisterPermission();
  if (log.isLoggable(java.util.logging.Level.FINE)) {
    log.log(java.util.logging.Level.FINE,"Try to register " + algorithmURI + " "+ implementingClass);
  }
  Class<? extends SignatureAlgorithmSpi> registeredClass=algorithmHash.get(algorithmURI);
  if (registeredClass != null) {
    Object exArgs[]={algorithmURI,registeredClass};
    throw new AlgorithmAlreadyRegisteredException("algorithm.alreadyRegistered",exArgs);
  }
  try {
    Class<? extends SignatureAlgorithmSpi> clazz=(Class<? extends SignatureAlgorithmSpi>)ClassLoaderUtils.loadClass(implementingClass,SignatureAlgorithm.class);
    algorithmHash.put(algorithmURI,clazz);
  }
 catch (  NullPointerException ex) {
    Object exArgs[]={algorithmURI,ex.getMessage()};
    throw new XMLSignatureException("algorithms.NoSuchAlgorithm",exArgs,ex);
  }
}

@ SuppressWarnings ( "unchecked" ) public static void register ( String algorithmURI , String implementingClass ) throws AlgorithmAlreadyRegisteredException , ClassNotFoundException , XMLSignatureException { JavaUtils . checkRegisterPermission ( ) ; if ( log . isLoggable ( java . util . logging . Level . FINE ) ) { log . log ( java . util . logging . Level . FINE , "Try to register " + algorithmURI + " " + implementingClass ) ; } Class < ? extends SignatureAlgorithmSpi > registeredClass = algorithmHash . get ( algorithmURI ) ; if ( registeredClass != null ) { Object exArgs [ ] = { algorithmURI , registeredClass } ; throw new AlgorithmAlreadyRegisteredException ( "algorithm.alreadyRegistered" , exArgs ) ; } try { Class < ? extends SignatureAlgorithmSpi > clazz = ( Class < ? extends SignatureAlgorithmSpi > ) ClassLoaderUtils . loadClass ( implementingClass , SignatureAlgorithm . class ) ; algorithmHash . put ( algorithmURI , clazz ) ; } catch ( NullPointerException ex ) { Object exArgs [ ] = { algorithmURI , ex . getMessage ( ) } ; throw new XMLSignatureException ( "algorithms.NoSuchAlgorithm" , exArgs , ex ) ; } }
registers implementing class of the signaturealgorithm with algorithmuri
