http://phecoopwm6x7azx26ctuqcp6673bbqkrqfeoiz2wwk36sady5tqbdpqd.onion/posts/python/generating-hmacs-with-different-hashing-algorithms.html
This snippet allows you to specify the hashing algorithm to use Similar To Generating a SHA1-HMAC in Python Generating a HMACs with different algorithms (Python3) Details Language: Python Snippet import hashlib import hmac def createHMAC ( signstr , secret , algo ): ''' Create a HMAC of signstr using secret and algo ''' hashedver = hmac . new ( secret , signstr , algo ) return hashedver . digest () . encode ( 'hex' ) Usage Example >>> createHMAC ( 'Sign this string' , 'MySecret' , hashlib . sha1 )...