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
secure_random(default:on): Enable secure RNG when generating padding bytes for tc_tea.
Install
Add the following to [dependencies] section in your Cargo.toml file:
= "0.1.3"
Troubleshooting
- Key need to have
16bytes or more.Nonewill be returned if less than16bytes provided.- If more bytes were provided, only the first 16 bytes will be used.
- Encrypted data should have a size that is multiple of 8.
Nonewill be returned ifencrypted_data.len() % 8 > 0.
Usage
use tc_tea;
License
Dual licensed under MIT OR Apache-2.0 license.
SPDX-License-Identifier: MIT OR Apache-2.0