def translate_passwd(uin, pw, verify): # import pdb # pdb.set_trace() # pw1 = (hashlib.md5(pw).hexdigest().upper()).decode("hex") # pw2 = hashlib.md5(pw1 + uin).hexdigest().upper() # return hashlib.md5(pw2 + verify).hexdigest().upper() cx = Runtime().new_context() cx.execute(open("encrypt.js").read()) res = cx.execute('Encryption.getEncryption("{password}","{qq_number}",\ "{verify_code}")'.format(password=pw, qq_number=uin, verify_code=verify)) return res