TEA

Implementation of Tiny Encryption Algorithm (TEA) digester.

TEA is a symmetric block cipher with a block size of 64 bits and a key size of 128 bits. It operates on 64-bit blocks using a Feistel network structure. TEA is designed to be fast and simple, yet difficult to cryptanalyze.

Members

Static functions

decrypt
void decrypt(ubyte[] data, string key)

Decrypts the given byte array data using TEA algorithm.

encrypt
void encrypt(ubyte[] data, string key)

Encrypts the given byte array data using TEA algorithm.

Examples

import tern.digest.tea;

ubyte[] data = [1, 2, 3, 4, 5];
string key = "my_secret_key";
TEA.encrypt(data, key);

Meta