def hasher(data, algos=ALGOS):
try:
data = data.encode()
except Exception:
pass
result = {}
for algo in sorted(hashlib.algorithms_available):
if algo in algos:
h = hashlib.new(algo)
h.update(data)
result[algo] = h.hexdigest()
return result
评论列表
文章目录