本文介绍了将单词更改为md5加密形式的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
—SA
This is not encryption, but a cryptographic hash function, which is a very different thing. Yes, it can be good enough to store passwords. See en.wikipedia/wiki/Cryptographic_hash_function[^].
A word or warning: don''t use MD5! This algorithm is considered broken, see en.wikipedia/wiki/MD5[^]. I would recommend to use the functions of the Secure Hash Algorithm ("SHA") family, see en.wikipedia/wiki/SHA2[^].
To use the cryptographic hash functions with PHP, see:
php/manual/en/function.hash.php[^].
—SA
我想将密码更改为md5加密形式,然后保存到数据库中,请提供代码.
i want to change my password to md5 encrypted form and then save to the database please provide the code.
推荐答案这不是加密,而是加密哈希函数 ,这是非常不同的东西.是的,它足以存储密码.请参见 en.wikipedia/wiki/Cryptographic_hash_function [ ^ ]. 一个字或一个警告:请勿使用MD5!该算法被认为已损坏,请参见 en.wikipedia/wiki/MD5 [ ^ ].我建议使用安全哈希算法("SHA")系列的功能,请参见 en.wikipedia/Wiki/SHA2 [ ^ ]. 要将密码哈希函数与PHP一起使用,请参见: php/manual/en/function.hash.php [ ^ ].
更多推荐
将单词更改为md5加密形式的代码
发布评论