if (result != null && !result.selfTest()) {
if (result != null && ! result.selfTest())
  public static IMessageDigest getInstance(String name)  {    if (name == null)      {        return null;      }    name = name.trim();    IMessageDigest result = null;    if (name.equalsIgnoreCase(Registry.WHIRLPOOL_HASH))      {        result = new Whirlpool();      }    else if (name.equalsIgnoreCase(Registry.RIPEMD128_HASH)             || name.equalsIgnoreCase(Registry.RIPEMD_128_HASH))      {        result = new RipeMD128();      }    else if (name.equalsIgnoreCase(Registry.RIPEMD160_HASH)             || name.equalsIgnoreCase(Registry.RIPEMD_160_HASH))      {        result = new RipeMD160();      }    else if (name.equalsIgnoreCase(Registry.SHA160_HASH)             || name.equalsIgnoreCase(Registry.SHA_1_HASH)             || name.equalsIgnoreCase(Registry.SHA1_HASH)             || name.equalsIgnoreCase(Registry.SHA_HASH))      {        result = new Sha160();      }    else if (name.equalsIgnoreCase(Registry.SHA256_HASH))      {        result = new Sha256();      }    else if (name.equalsIgnoreCase(Registry.SHA384_HASH))      {        result = new Sha384();      }    else if (name.equalsIgnoreCase(Registry.SHA512_HASH))      {        result = new Sha512();      }    else if (name.equalsIgnoreCase(Registry.TIGER_HASH))      {        result = new Tiger();      }    else if (name.equalsIgnoreCase(Registry.HAVAL_HASH))      {        result = new Haval();      }    else if (name.equalsIgnoreCase(Registry.MD5_HASH))      {        result = new MD5();      }    else if (name.equalsIgnoreCase(Registry.MD4_HASH))      {        result = new MD4();      }    else if (name.equalsIgnoreCase(Registry.MD2_HASH))      {        result = new MD2();      }    else if (name.equalsIgnoreCase(Registry.HAVAL_HASH))      {        result = new Haval();      }    if (result != null && !result.selfTest())      {        throw new InternalError(result.name());      }    return result;  }