import hashlib def md5(arg):#这是加密函数 md5_pwd = hashlib.md5(bytes('meac',encoding='utf-8')) md5_pwd.update(bytes(arg,encoding='utf-8')) return md5_pwd.hexdigest()#返回加密的数据 def log(user,pwd): try: with open('login','r',encoding='utf-8') as f: for line in…
转自:https://www.cnblogs.com/zhihai/archive/2012/05/03/2480856.html using System;using System.Collections.Generic;using System.Text;using System.Security.Cryptography;using System.IO; namespace Ecan{ public class EcanSecurity { /*MD5是messa…
用于加密相关的操作,3.x里代替了md5模块和sha模块,主要提供 SHA1, SHA224, SHA256, SHA384, SHA512 ,MD5 算法 import hashlib m = hashlib.md5() m.update(b"hello") print(m.hexdigest()) m.update(b"It's me") print(m.hexdigest()) m.update(b"It's been a long time sin…