-
-
Save vigzmv/8919591eae32878bab466b5f8cb8a111 to your computer and use it in GitHub Desktop.
Python SHA-256 HMAC
This file contains hidden or 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
from Crypto.Hash import HMAC, SHA256 | |
def hmac_sha256(key, msg): | |
hash_obj = HMAC.new(key=key, msg=msg, digestmod=SHA256) | |
return hash_obj.hexdigest() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment