Electronic Invoicing System API v1
Developers Guide
×
Menu
Index

2.4.1.4. Python

 
def compute_hmac_Sha512(plain_text, secret_key):
 
    hash_object = hmac.new(secret_key.encode('utf-8'), plain_text.encode('utf-8'), hashlib.sha512)
   
    return base64.b64encode(hash_object.digest()).decode('utf-8')