public class test { public static void main(String[] args) throws NoSuchAlgorithmException, UnsupportedEncodingException{ String newstr=EncoderByMd5("aa"); System.out.println(newstr); } public static String EncoderByMd5(String str) throws NoSuchAlgorithmException, UnsupportedEncodingException {