public String encrypt_SHA(String source) throws Exception { MessageDigest sha = MessageDigest.getInstance("SHA"); sha.update(source.getBytes()); return Base64.encodeToString(sha.digest(), Base64.DEFAULT); }
原文地址:http://blog.csdn.net/u013425527/article/details/41924407