Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 484 Bytes

README.rst

File metadata and controls

29 lines (21 loc) · 484 Bytes

PyTEA

Wiki

Tiny Encryption Algorithm (TEA)

Installation

pip install PyTEA

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())