python3 hashlib

import hashlib
print(hashlib.algorithms_available)
md = hashlib.md5()
md.update('how to use '.encode('utf-8'))
print(md.hexdigest())
sh = hashlib.sha512()
sh.update('how to use '.encode('utf-8'))
print(sh.hexdigest())

结果:

{'md5', 'ripemd160', 'sha224', 'whirlpool', 'sha384', 'SHA384', 'MD4', 'blake2b', 'sha512', 'BLAKE2s256', 'blake2s', 'SHA1', 'sha3_224', 'sha1', 'RIPEMD160', 'mdc2', 'md4', 'md5-sha1', 'blake2b512', 'sha3_256', 'shake_128', 'MD5-SHA1', 'blake2s256', 'sha3_384', 'shake_256', 'SHA512', 'BLAKE2b512', 'SHA256', 'sha3_512', 'MD5', 'SHA224', 'MDC2', 'sha256'}
412303473b07692c714632961d1180a9
70227a10a779306bb64a12ef9ed67feb9fb2d437049977eaf6a5740f6d962ea855426940b3b3847cfc91b8709b6199b2ab621c5c4ef1fb749e114fb550da99ed

结论:很多安全算法都可以用python来实现加密,但是无法解密!

 

你可能感兴趣的:(python3,hashlib,sha,md5)