mirror of
https://github.com/jixunmoe/tc_tea_rust
synced 2026-03-07 20:19:49 +00:00
doc: module doc + readme
This commit is contained in:
18
README.md
18
README.md
@@ -16,16 +16,16 @@ Code implemented according to the spec described in
|
||||
Add the following to `[dependencies]` section in your `Cargo.toml` file:
|
||||
|
||||
```toml
|
||||
tc_tea = "0.1.0"
|
||||
tc_tea = "0.1.1"
|
||||
```
|
||||
|
||||
## Failures
|
||||
## Troubleshooting
|
||||
|
||||
* Key size needs to be `>= 16` bytes.
|
||||
* `None` will be returned in this case.
|
||||
* Only first 16 bytes are used.
|
||||
* Encrypted size are always multiple of 8.
|
||||
* `None` will be returned in this case.
|
||||
* Key need to have `16` bytes or more.
|
||||
* `None` will be returned if less than `16` bytes 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.
|
||||
* `None` will be returned if `encrypted_data.len() % 8 > 0`.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -44,7 +44,9 @@ fn hello_tc_tea() {
|
||||
|
||||
Dual licensed under MIT OR Apache-2.0 license.
|
||||
|
||||
`SPDX-License-Identifier: MIT OR Apache-2.0`
|
||||
```license
|
||||
SPDX-License-Identifier: MIT OR Apache-2.0
|
||||
```
|
||||
|
||||
[tc_tea_cpp]: https://github.com/TarsCloud/TarsCpp/blob/a6d5ed8/util/src/tc_tea.cpp
|
||||
[tc_tea_spec]: https://github.com/iweizime/StepChanger/wiki/%E8%85%BE%E8%AE%AFTEA%E5%8A%A0%E5%AF%86%E7%AE%97%E6%B3%95
|
||||
|
||||
Reference in New Issue
Block a user