from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
key = b'secretkey12345'
cipher = AES.new(key, AES.MODE_CBC)
ct_bytes = cipher.encrypt(pad(b'plaintext', AES.block_size))
ct = ct_bytes.hex()
print(ct)
]]>
import jwt
import datetime
token = jwt.encode({'user': 'alice', 'exp': datetime.datetime.utcnow() + datetime.timedelta(seconds=60)}, 'secret', algorithm='HS256')
print(token)
]]>