Quantcast
Viewing all articles
Browse latest Browse all 99

Quickalerts Content hash verification example is wrong

I’m trying to verify the content hash from body, but the code at

looks wrong:

computed_content_hash = base64.b64encode(computed_hash).decode()

computed_content_hash should be the same value of x-qn-content-hash,
but x-qn-content-hash is not a base64 encoded value, but looks like an hexdigest of
a sha256, perhaps in my tests the sha256 of the body is even different from the one in x-qn-content-hash
header, there is an updated code for that check?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 99

Trending Articles