-
-
Save wyw/5c8289895234b2595652c7ffa44e4725 to your computer and use it in GitHub Desktop.
Python SHA-256 HMAC
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
from Crypto 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