So the documentation i am looking at says to generate a Signature Value with C#, however I am wanting to do the whole thing in Python here is the information they have given me, however the expected result is Signature: wpGKFbhcBl+8JLVXGP0QqBooK6dtLBv9bYtI15NXL1U= for SHA256, I am returning b'YzI5MThhMTViODVjMDY1ZmJjMjRiNTU3MThmZDEwYTgxYTI4MmJhNzZkMmMxYmZkNmQ4YjQ4ZDc5MzU3MmY1NQ=='
Can someone point me into the right direction?
var bytesToHash = Encoding.UTF8.GetBytes(TimeStamp.GetUnixTime() + transactionId + apiKey);
string signature = Convert.ToBase64String(GetHashAlgorithm(Algorithm).ComputeHash(bytesToHash));
My code:
import hashlib
import base64
epochTime = 1547498533216
transactionId = "07643622"
APIKey = "13f1fd1b-ab2d-4c1f-8e2c-ca61878f2a44"
hash256 = bytes(str(epochTime) + transactionId + APIKey,'utf-8')
print(hash256)
signature = base64.b64encode(bytes(hashlib.sha256(hash256).hexdigest(),'utf-8'))
print(signature)