http://phecoopwm6x7azx26ctuqcp6673bbqkrqfeoiz2wwk36sady5tqbdpqd.onion/posts/python3/generate-hmacs-with-different-algorithms.html
This Python 3 snippet allows you to specify the hashing algorithm to use Similar To Generating HMACs with different hashing algorithms (Python2) Generate a SHA1-HMAC (Python2) Details Language: Python3 Snippet import hashlib import hmac def createHMAC ( signstr , secret , algo ): ''' Create a HMAC of signstr using secret and algo ''' hashedver = hmac . new ( secret . encode ( 'utf-8' ), signstr . encode ( 'utf-8' ), algo ) return hashedver . hexdigest () Usage Example >>>...