Skip to content

Instantly share code, notes, and snippets.

View vigzmv's full-sized avatar

Vignesh M vigzmv

View GitHub Profile
@vigzmv
vigzmv / hmac_sha256.py
Last active July 9, 2017 08:26 — forked from theY4Kman/hmac_sha256.py
Python SHA-256 HMAC
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()