권남의 Github 권남의 위키 까먹지말자! 블로그 권남의 Twitter URLEncode/HTMLEscape Java Properties
from hashlib import sha256 from hmac import HMAC from base64 import b64encode # encode message with HMAC_SHA1 hm = HMAC('secretKey', 'message', sha256) # to hexdigit hmac_auth = hm.hexdigest() # or to base64 string hmac_auth = b64encode(hm.digest())