Commit 0cb0cbaf authored by Andreas Jung's avatar Andreas Jung

sha -> hashlib

parent 13d8ba0a
......@@ -167,9 +167,9 @@ def get_inituser():
def write_inituser(fn, user, password):
import binascii
import sha
import hashlib
fp = open(fn, "w")
pw = binascii.b2a_base64(sha.new(password).digest())[:-1]
pw = binascii.b2a_base64(hashlib.sha256(password).digest())[:-1]
fp.write('%s:{SHA}%s\n' % (user, pw))
fp.close()
os.chmod(fn, 0644)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment