Just be a little bit more precise in the kind of exception we throw.
This commit is contained in:
parent
0fa15992cf
commit
78c56ac382
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ public class MD5Encoder {
|
||||||
System.out.println( "adminPassword=" + encode(args[1]) );
|
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");
|
md = MessageDigest.getInstance("MD5");
|
||||||
byte[] b = md.digest(str.getBytes());
|
byte[] b = md.digest(str.getBytes());
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuffer buf = new StringBuffer();
|
||||||
|
|
Loading…
Add table
Reference in a new issue