抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >


Python MD5

MD5.py
import hashlib
class MD5:
def str():
str=input()
m = hashlib.md5()
m.update(str.encode('utf-8'))
print (m.hexdigest())

def filebin():
src=input()
f = open(src, 'rb')
f_md5 = hashlib.md5()
f_md5.update(f.read())
print (f_md5.hexdigest())

def file():
src=input()
f = open(src, 'r')
f_md5 = hashlib.md5()
f_md5.update(f.read().encode('utf-8'))
print (f_md5.hexdigest())

if __name__=='__main__':
try:
while True:
MD5.filebin()
except EOFError:
exit()
推荐阅读
Python Caesar Python Caesar Python Base Python Base Python ASCII 字符串 转换 Python ASCII 字符串 转换 Cryptography Cryptography Python RailFenceCipher Python RailFenceCipher Python Baconian Python Baconian

留言区

Are You A Robot?