Skip to main content

XTEA3 implementation

Project description

python-xtea3

GitHub Actions PyPI - Version PyPI - Python Version PyPI - License

Buy me a coffee Support me Patreon Liberapay

XTEA3 implementation

Installation

pip install python-xtea3

How to use

from xtea3 import encipher, decipher

origin_data = b'Hello XTEA3 !' * 42
key_bytes = b'1234567890123456' * 2  # 32 bytes (256 bits)
num_rounds = 32
endian = '!'

encrypted_data = encipher(origin_data, key_bytes, num_rounds, endian)
print(encrypted_data.hex())

decrypted_data = decipher(encrypted_data, key_bytes, num_rounds, endian)
print(decrypted_data)
assert origin_data == decrypted_data

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_xtea3-0.2.0.tar.gz (335.7 kB view details)

Uploaded Source

File details

Details for the file python_xtea3-0.2.0.tar.gz.

File metadata

  • Download URL: python_xtea3-0.2.0.tar.gz
  • Upload date:
  • Size: 335.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for python_xtea3-0.2.0.tar.gz
Algorithm Hash digest
SHA256 058473fc6d482b20d04c4aea2ecc5829d5d17dbb36f65e0b5871df1915cd8f0b
MD5 84322a0113bdd498dd7f99510fc2ab9c
BLAKE2b-256 bca79c8697713250eb556c701a2db7fd7da283fe057d0a858309a22076f01a4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page