我正在使用这个代码来加密我的密码......
private static final String md5(final String password) {
try {
MessageDigest digest = java.security.MessageDigest
.getInstance("MD5");
digest.update(password.getBytes());
byte messageDigest[] = digest.digest();
StringBuffer hexString = new StringBuffer();
for (int i = 0; i < messageDigest.length; i++) {
String h = Integer.toHexString(0xFF & messageDigest[i]);
while (h.length() < 2)
h = "0" + h;
hexString.append(h);
}
return hexString.toString();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
return "";
}如何添加(Secretkey)以便可以将值发送到.net
发布于 2014-02-26 21:08:12
使用AES加密怎么样?
你可以在What are best practices for using AES encryption in Android?上找到使用它的例子
https://stackoverflow.com/questions/22042152
复制相似问题