c = ctypes.create_string_buffer(mlen.value + 16)
clen = ctypes.c_ulonglong(0)
sodium.crypto_aead_chacha20poly1305_encrypt(c, ctypes.byref(clen), message,
    mlen, ad, adlen, None, nonce, key)
return c.raw
Python Ctypes с RaspberryPi