import hashlib
import sys
 
def md5s():
    m=hashlib.md5()
    strs=sys.argv[1]
    m.update(strs.encode("utf8"))
    print(m.hexdigest())
 
if __name__=='__main__':
 
    md5s()

  

注意update()必须指定要加密的字符串的字符编码。

 

参考:https://blog.csdn.net/u012087740/article/details/48439559

相关文章:

  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
猜你喜欢
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-12-29
  • 2022-12-23
相关资源
相似解决方案