[Python] python的bcrypt加密方式验证 →→→→→进入此内容的聊天室

来自 , 2019-10-31, 写在 Python, 查看 151 次.
URL http://www.code666.cn/view/bf25356f
  1. >>> import bcrypt
  2. >>> s = 'hello'
  3. >>> hash = bcrypt.hashpw(s, bcrypt.gensalt())
  4. >>> print hash
  5. $2a$12$1VwtpKmC77PkaoTol0HIS.Wqp24FUNHcB2OyPLPQBwVO.P3NVEwWq
  6. >>> hash2 = bcrypt.hashpw(s, hash)
  7. >>> hash == hash2
  8. True
  9. #//python/7139

回复 "python的bcrypt加密方式验证"

这儿你可以回复上面这条便签

captcha