Skip to main content

Tiny Encryption Algorithm (TEA) in Python.

Project description

Usage

from pytea import TEA
key = os.urandom(16)
print('key is', key)
content = 'Hello, 你好'
tea = TEA(key)
e = tea.encrypt(content.encode())
print('encrypt hex:', e.hex())
d = tea.decrypt(e)
print('decrypt:', d.decode())

Project details


Download files

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

Files for PyTEA, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size PyTEA-0.1.1.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page