# encoding:utf-8 import hashlib key = "随便啥" value = hashlib.sha256(key.encode()).hexdigest() print(value)