import base64
import hmac
import hashlib

myKey = b'tajny_klucz'
with open('./test.txt', 'rb') as f:
    body = f.read(5)

hash = hmac.new(myKey, body, hashlib.sha256)
digest = hash.digest()
print(base64.encodebytes(digest))
