foodforus: move api_key to end of signature
parent
bc9d6f3453
commit
db3b6ba2d0
|
@ -14,11 +14,12 @@ API_URL = 'http://foodfor.vtluug.org'
|
|||
|
||||
|
||||
def _sign_vote(api_key, args):
|
||||
data = "ffu0" + api_key
|
||||
data = "ffu1"
|
||||
for k, v in sorted(args.items()):
|
||||
if k == 'sig':
|
||||
continue
|
||||
data += '{0}{1}'.format(k, v)
|
||||
data += api_key
|
||||
h = hashlib.sha256()
|
||||
h.update(data.encode('utf-8'))
|
||||
return h.hexdigest()
|
||||
|
|
Loading…
Reference in New Issue