Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
只需调用您已经在pwandsalt字符串上提到的方法:
pw
salt
pw_bytes = pw.encode('utf-8') salt_bytes = salt.encode('utf-8') return hashlib.sha256(pw_bytes + salt_bytes).hexdigest() + "," + salt