code: public static synchronized void registerHashAlgorithm(String name,
        HashAlgorithm alg) {
      validateName(name);
      validateAlgorithm(alg);
      REGISTRY.put(name.toLowerCase(), alg);
    }
docs: Registers provided {@link HashAlgorithm} instance with the given name. Name
  is not case sensitive. Any registered algorithm with the same name will be
  substituted
  
  @param name name of the algorithm
  @param alg algorithm instance to register