public String encrypt_SHA(String source) throws Exception { MessageDigest sha = MessageDigest.getInstance("SHA"); sha.update(source.getBytes()); return Base64.encodeToString(sha.digest(), Base64.DEFAULT); }
时间: 2024-09-27 21:32:53
public String encrypt_SHA(String source) throws Exception { MessageDigest sha = MessageDigest.getInstance("SHA"); sha.update(source.getBytes()); return Base64.encodeToString(sha.digest(), Base64.DEFAULT); }