hashlib模块简单使用
import hashlib
def encrypt_password(passwd):
    # h = hashlib.sha256(passwd.encode('utf8))
    salt = "abcdeasd11234"
    h = hashlib.sha256()
    h.update(passwd.encode('utf8'))
    h.update(salt.encode('utf8'))
    return h.hexdigest()
print(encrypt_password("123"))
本文来自博客园,作者:弩哥++,转载请注明原文链接:https://www.cnblogs.com/bangbangzoutianya/p/17684357.html
                    
                
                
            
        
浙公网安备 33010602011771号