-1
请让我知道等效代码来解密。我使用这种编码方法加密了我的密码,现在我想现在解密。什么是等效解密代码
MessageDigest digest = MessageDigest.getInstance("MD5");
digest.update(password.getBytes());
BASE64Encoder encoder = new BASE64Encoder();
byte hashedBytes[] = (new String(digest.digest(), "UTF-8")).getBytes();
System.out.println(encoder.encode(hashedBytes))
这是[如何解密SHA-256加密字符串?](http://stackoverflow.com/questions/9316437/how-to-decrypt-sha-256-encrypted-string)的重复,差异散列函数并不重要。此外,请阅读[散列密码和加密之间的区别](http://stackoverflow.com/questions/326699/difference-between-hashing-a-password-and-encrypting-it) –
您应该阅读[如何安全地哈希密码?](http://security.stackexchange.com/questions/211/how-to-securely-hash-passwords)。它解释了为什么你不需要解密来验证密码,以及为什么MD5甚至SHA-2是密码哈希的不好选择。 – CodesInChaos