我可以md5(sha1(password))吗? [英] Can I md5(sha1(password))?

查看:99
本文介绍了我可以md5(sha1(password))吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在编写自己的CMS,并且处于密码状态...

I'm currently coding my own CMS and I'm at the state of password...

我想知道是否可以先输入md5密码,然后再输入sha1吗?

I want to know if I can md5 a password then sha1 it after?

赞:

$password = md5(sha1(mysql_real_escape_string($_POST['passw'])));

推荐答案

即使您之前对哈希进行了哈希处理,也可以md5您想要的任何数据.

You can md5 any data you'd like, even if it was hashed before.

但是,这只会增加发生碰撞的风险,因为您现在正在处理较小的数据集.

It will, however, only increase the risk of collisions because you're now working on a smaller dataset.

您要达到什么目标?

这篇关于我可以md5(sha1(password))吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆