Security and Cryptography in Python - Hash Functions(3)
2021-06-10 00:06
标签:class enc pre http html org ase result word https://docs.python.org/3/library/hashlib.html https://en.wikipedia.org/wiki/PBKDF2 Running Result: Security and Cryptography in Python - Hash Functions(3) 标签:class enc pre http html org ase result word 原文地址:https://www.cnblogs.com/keepmoving1113/p/14471154.htmlSecurity and Cryptography in Python - Hash Functions(3)
How password are Verified
import hashlib
import base64
iterations = 45454
salt = base64.b64decode("6VuJKkHVTdDelbNMPBxzw7INW2NkYlR/LoW40L7kVAI=".encode())
#SALTED-SHA512-PBKDF2
password = "password".encode()
value = hashlib.pbkdf2_hmac("sha512", password, salt, iterations, dklen=128)
print(base64.b64encode(value))
文章标题:Security and Cryptography in Python - Hash Functions(3)
文章链接:http://soscw.com/index.php/essay/92910.html