Created
January 22, 2018 17:59
-
-
Save pbteja1998/94853812de77f3b00ff45577318af7b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hash_data(data): | |
''' | |
param: data b64encoded data | |
return: SHA256 base64 encoded hash | |
''' | |
from base64 import b64decode | |
from Crypto.Hash import SHA256 | |
hashed_data = SHA256.new() | |
hashed_data.update(b64decode(data)) | |
return hashed_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment