@nakov/

HMAC SHA256 in Python

Python

HMAC-SHA256 calculation in Python

fork
loading
Files
  • main.py
main.py
1
2
3
4
import hashlib, hmac, binascii

mac = hmac.new(b'key', b'some msg', hashlib.sha256).digest()
print(binascii.hexlify(mac))