Install & Compatibility
Where this runs
tested against v5.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
encrypt
✓ import xxtea; xxtea.encrypt(data, key, padding=True)
✗ from xxtea import xxtea_encrypt
The legacy API used different function names. Use the module-level functions.
decrypt
✓ import xxtea; xxtea.decrypt(ciphertext, key, padding=True)
✗ from xxtea import decrypt
Direct import of decrypt works, but ensure you pass key as bytes, not string.
Encrypt and decrypt a bytes message using a key.
import os
import xxtea
data = b'Hello, World!'
key = os.environ.get('XXTEA_KEY', 'secret').encode()
encrypted = xxtea.encrypt(data, key)
print(encrypted.hex())
decrypted = xxtea.decrypt(encrypted, key)
print(decrypted)
Upgrade
Version history
5.1.0latest on PyPI · released Jun 15, 2026
Audit
Dependencies
No dependency data recorded yet.