md5加密

public static void main(String[] args) throws NoSuchAlgorithmException {
String systemcode = "xxx"; //密钥
String password = "enasddsa"+systemcode;
MessageDigest md = MessageDigest.getInstance("md5");
byte[] md5 = md.digest(password.getBytes());
BASE64Encoder encoder = new BASE64Encoder();
String md5Encoder = encoder.encode(md5);
System.out.println(md5Encoder);
}

posted @ 2016-06-08 10:29  N神3  阅读(207)  评论(0编辑  收藏  举报