blob: 057ed4bcbb68d6f383485e4339e37760090f2924 (
plain)
1
2
3
4
5
6
7
8
9
|
import hashlib
import logging
log = logging.getLogger('rhizi')
def hash_pw(pw_str, salt_str):
salt = hashlib.sha512(salt_str).hexdigest()
ret = hashlib.sha512(pw_str + salt).hexdigest()
return ret
|