Just be a little bit more precise in the kind of exception we throw.

This commit is contained in:
hns 2002-03-26 12:10:49 +00:00
parent 0fa15992cf
commit 78c56ac382

View file

@ -21,7 +21,7 @@ public class MD5Encoder {
System.out.println( "adminPassword=" + encode(args[1]) );
}
public static String encode(String str) throws Exception {
public static String encode(String str) throws NoSuchAlgorithmException {
md = MessageDigest.getInstance("MD5");
byte[] b = md.digest(str.getBytes());
StringBuffer buf = new StringBuffer();