Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.hsqldb.lib;
 
 
 public final class MD5
 {
   private static MessageDigest md5;
  public static final String encodeString(String paramString1String paramString2)
    throws RuntimeException
  {
    return StringConverter.byteToHex(digestString(paramString1, paramString2));
  }
  public static byte[] digestString(String paramString1String paramString2)
    throws RuntimeException
  {
    if (paramString2 == null)
      paramString2 = "ISO-8859-1";
    byte[] arrayOfByte;
    try
    {
      arrayOfByte = paramString1.getBytes(paramString2);
    }
    catch (UnsupportedEncodingException localUnsupportedEncodingException)
    {
      throw new RuntimeException(localUnsupportedEncodingException.toString());
    }
    return digestBytes(arrayOfByte);
  }
  public static final byte[] digestBytes(byte[] paramArrayOfByte)
    throws RuntimeException
  {
    synchronized (MD5.class)
    {
      if (md5 == null)
        try
        {
          md5 = MessageDigest.getInstance("MD5");
        }
        catch (NoSuchAlgorithmException localNoSuchAlgorithmException)
        {
          throw new RuntimeException(localNoSuchAlgorithmException.toString());
        }
      return md5.digest(paramArrayOfByte);
    }
  }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
 * Qualified Name:     org.hsqldb.lib.MD5
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X