Md5盐密码php

编程入门 行业动态 更新时间:2024-10-26 06:34:01
本文介绍了Md5盐密码php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我知道有关这个问题的问题很多,但我真的需要问这个问题。

今天我一直在使用md5加密密码。 / p>

所以我做了什么。

我有4种盐。 (它们根据用户值而变化)

  • 从电子邮件id和substr然后md5他们
  • 从电子邮件和id substr其他位置
  • 一个长字符串,substr它然后md5它
  • 另一个长字符串,substr它然后md5它
  • 然后我md5 salt1和3以及salt 2和salt4的密码

    此后,我必须自动更改密码,只要用户更改电子邮件或更改其ID。

    你们有什么想法?

    解决方案

    没有任何东西

    MD5坏了, p>

    使用mailaddress作为salt是一个好主意。但是使用md5不是。使用bcrypt,scrypt或pbkdf2。

    不要发明自己的ecryption,除非你真的知道你在做什么,相信我,你不会/ p>

    I know that there are alots of questions about this subject but i really need to ask this.

    Today I've been working on encrypting passwords with md5.

    So what I've done is.

    I got 4 salts. (they changes depending on user values)

  • from email id and substr then md5 them
  • from email and id substr other positions
  • a long string, substr it and then md5 it
  • another long string, substr it and then md5 it
  • Then i md5 salt1 and 3 and the password with salt 2 and salt4

    After this I have to change the password automatically whenever a user changes his email or his id getting changed.

    What do you guys think about this?

    解决方案

    Nothing.

    MD5 is broken and bad.

    Using the mailaddress as salt is a good idea. But using md5 is not. Use instead bcrypt, scrypt or pbkdf2.

    Don't invent your own ecryption, unless you really know what you are doing, and trust me, you don't

    更多推荐

    Md5盐密码php

    本文发布于:2023-10-25 00:03:24,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1525371.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:密码   php

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!