tc_tea

Rusty implementation of Tencent modified TEA (tc_tea).

Test data generated using its C++ implementation: tc_tea.cpp (BSD-3-Clause).

Code implemented according to the spec described in iweizime/StepChanger:腾讯 TEA 加密算法.

Features

Install

Add the following to [dependencies] section in your Cargo.toml file:

toml tc_tea = "0.1.0"

Failures

Usage

```rust use tc_tea;

fn hellotctea() { let key = "12345678ABCDEFGH"; let encrypted = tctea::encrypt(&"hello", &key).unwrap(); let decrypted = tctea::decrypt(&encrypted, &key).unwrap(); asserteq!("hello", std::str::fromutf8(&decrypted).unwrap()); } ```

License

Dual licensed under MIT OR Apache-2.0 license.

SPDX-License-Identifier: MIT OR Apache-2.0