python 中密码处理函数

一个简单的对某字符串进行 MD5加密

import hashlib


def md5_pwd(pwd):
    """
    为了防止解密,hashlib.md5时加入了自己的字段
    将密码转为md5形式
    :param pwd: 密码铭文
    :return: 加密的结果
    """
    hash = hashlib.md5(bytes('dapeng',encoding='utf8'))
    hash.update(bytes(pwd,encoding='utf8'))
    res = hash.hexdigest()
    return  res

 

 

 

 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-09-29
  • 2021-10-04
  • 2021-10-12
  • 2021-12-18
猜你喜欢
  • 2021-10-25
  • 2022-01-24
  • 2021-09-28
  • 2021-11-29
  • 2021-07-14
  • 2021-09-12
相关资源
相似解决方案