Skip to content

Commit 1d64c65

Browse files
author
paul
committed
when concatenating values into a string, values need to be separated by a pipe
1 parent 2510826 commit 1d64c65

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

md5hash.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ def hash(boxID, coin_name, public_key, private_key, webdev_key, amount,
44
period, amountUSD, userID, language, iframeID, orderID,
55
width, height):
66
user_format = 'MANUAL'
7-
string = ''
8-
string = (str(boxID) + coin_name + public_key + private_key +webdev_key +
9-
str(amount) + period + str(amountUSD)+ language + str(amount) +
10-
iframeID + str(amountUSD) + userID + user_format + orderID +
11-
str(width) + str(height))
7+
values_to_combine = [
8+
str(boxID), coin_name, public_key, private_key, webdev_key,
9+
str(amount), str(amountUSD), period, language,
10+
orderID, userID, user_format, iframeID,
11+
str(width), str(height),
12+
]
13+
string = '|'.join(values_to_combine)
1214
m = hashlib.md5(string.encode('utf-8'))
1315
return m.hexdigest()

md5hash.pyc

688 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)