码迷,mamicode.com
首页 > 其他好文 > 详细

MD5加密

时间:2017-12-13 20:09:57      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:md5加密   body   tac   message   get   stat   try   pos   result   

 1 /**
 2      * MD5加密
 3      * @param strObj 待加密数据
 4      * @return
 5      */
 6     public static byte[] MD5(String strObj) {
 7         byte[] resultString = null;
 8         try {
 9             MessageDigest md = MessageDigest.getInstance("MD5");
10             resultString = md.digest(strObj.getBytes());
11         } catch (NoSuchAlgorithmException ex) {
12             ex.printStackTrace();
13         }
14         return resultString;
15     }

 

MD5加密

标签:md5加密   body   tac   message   get   stat   try   pos   result   

原文地址:http://www.cnblogs.com/redhat0019/p/8034075.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!