2 个版本
| 0.2.2 | 2022年11月23日 |
|---|---|
| 0.2.1 | 2022年10月3日 |
#2067 in 加密学
66KB
1.5K SLoC
sett
Rust(部分)移植自 sett。
详细文档可以在 https://docs.rs/sett 找到。
用法
将 sett 添加到项目 Cargo.toml 的依赖项中。
[dependencies]
sett = "*"
默认情况下,库使用 Nettle 作为加密后端。然而,在 Windows 目标上,可以在编译时选择 Cryptography API: Next Generation (CNG):禁用默认功能(default-features = false)并启用 crypto-cng 功能。
示例二进制文件
运行 cargo run --example 以列出可用的示例。要运行特定的示例,例如执行。
cargo run --release --example encrypt -- --help
对于 Windows 目标,我们使用 crypto-cng 后端(而不是默认的 crypto-nettle)。可以通过启用 crypto-cng 并禁用默认功能来实现。
cargo run --release --no-default-features --features=crypto-cng --example encrypt -- --help
lib.rs:
sett(数据压缩、加密和传输工具)的 Rust 移植。
依赖项
~23–41MB
~654K SLoC