From 1d64c6559d41884ae43f7c6a9870af87fa27b772 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 28 Mar 2018 02:00:58 -0500 Subject: [PATCH] when concatenating values into a string, values need to be separated by a pipe --- md5hash.py | 12 +++++++----- md5hash.pyc | Bin 0 -> 688 bytes 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 md5hash.pyc diff --git a/md5hash.py b/md5hash.py index ccc7652..64cf02e 100644 --- a/md5hash.py +++ b/md5hash.py @@ -4,10 +4,12 @@ def hash(boxID, coin_name, public_key, private_key, webdev_key, amount, period, amountUSD, userID, language, iframeID, orderID, width, height): user_format = 'MANUAL' - string = '' - string = (str(boxID) + coin_name + public_key + private_key +webdev_key + - str(amount) + period + str(amountUSD)+ language + str(amount) + - iframeID + str(amountUSD) + userID + user_format + orderID + - str(width) + str(height)) + values_to_combine = [ + str(boxID), coin_name, public_key, private_key, webdev_key, + str(amount), str(amountUSD), period, language, + orderID, userID, user_format, iframeID, + str(width), str(height), + ] + string = '|'.join(values_to_combine) m = hashlib.md5(string.encode('utf-8')) return m.hexdigest() diff --git a/md5hash.pyc b/md5hash.pyc new file mode 100644 index 0000000000000000000000000000000000000000..92479e170141cf1c7bf6ccbc23ee92dfb1e63f68 GIT binary patch literal 688 zcmZuv&2H2%5S}F4?RLA}A0(v06XXInBqR``q8B9CL#tkTiIUixcuC?_JlVFA_XG#t ziHG9A1Hd;1#D&N+o|$j_&3NME$JzAzt8cd@{rO_-Zz1jpl){RrA-aVT(-#<#M6S~W zsQHO+UCv=Xf-E8LAnq#^k`8lXB2V-=B99f5Psoo#@JND!9tU(x{)GG~`3dw9G??KqX&voIF+{{3YD zOORw;-fEsAz8i|hl-Vc!z^CH&W}mYTzQA|7P2x@N!I-WJgKJY{QBY1g$5>=a&vy@DbYh25%3Gjh96yfEqgiwwFR-Wbw60{r bS5Kk-G5wcrf|S>-RYRlS$S-qpdKUizXs?eK literal 0 HcmV?d00001