private static final String nameToID(final String mdName) {
      if (Registry.SHA_HASH.equalsIgnoreCase(mdName)
            || Registry.SHA1_HASH.equalsIgnoreCase(mdName)
            || Registry.SHA160_HASH.equalsIgnoreCase(mdName)) {
         return "0";
      } else if (Registry.MD5_HASH.equalsIgnoreCase(mdName)) {
         return "1";
      } else if (Registry.RIPEMD128_HASH.equalsIgnoreCase(mdName)) {
         return "2";
      } else if (Registry.RIPEMD160_HASH.equalsIgnoreCase(mdName)) {
         return "3";
      } else if (Registry.SHA256_HASH.equalsIgnoreCase(mdName)) {
         return "4";
      } else if (Registry.SHA384_HASH.equalsIgnoreCase(mdName)) {
         return "5";
      } else if (Registry.SHA512_HASH.equalsIgnoreCase(mdName)) {
         return "6";
      }
      return "0";
   }