浏览代码

remove unused hmac line

raylu 11 年之前
父节点
当前提交
42920aa75d
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      web/db.py

+ 0 - 1
web/db.py

@@ -14,7 +14,6 @@ import config
 def hash_pw(password, salt=None):
 	if salt is None:
 		salt = os.urandom(16)
-	h = hmac.new(salt, password.encode('utf-8'), hashlib.sha256)
 	hashed = hashlib.pbkdf2_hmac('sha512', password.encode('utf-8'), salt, 100000)
 	hashed_hex = binascii.hexlify(hashed).decode()
 	salt_hex = binascii.hexlify(salt).decode()