sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #54358
[Question #689075]: Decoding hash for login script
New question #689075 on Sikuli:
https://answers.launchpad.net/sikuli/+question/689075
So basically doing an authentication for the compiled script using JSON file that contains a username and password. Everything is working just fine until I get to this function:
It seems to fail right on the thrid line: hsh = hashlib.pbkdf2_hmac('sha512'.....
import hashlib
import binascii
def _verify_pw(str_pw, prv_pw):
salt = str_pw[:64]
str_pw = str_pw[64:]
hsh = hashlib.pbkdf2_hmac('sha512',
prv_pw.encode('utf-8'),
salt.encode('ascii'),
100000)
hsh = binascii.hexlify(hsh).decode('ascii')
return hsh == str_pw
any suggestions?
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.