Skip to content

Commit 4744ec9

Browse files
committed
Set encoding before hashing
1 parent a585313 commit 4744ec9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Adyen/util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,5 @@ def escapeVal(val):
5050

5151
signing_string = ':'.join(map(escapeVal, chain(map(str,ordered_request.keys()), map(str,ordered_request.values()))))
5252

53-
54-
hm = hmac.new(hmac_key, signing_string, hashlib.sha256)
53+
hm = hmac.new(hmac_key, signing_string.encode('utf-8'), hashlib.sha256)
5554
return base64.b64encode(hm.digest())

0 commit comments

Comments
 (0)