Skip to main content

encryption/encryptor/
mod.rs

1// Copyright (c) 2026 erik <erik@erik.xyz> — https://erik.xyz
2
3//! 对称加密实现(对应 PHP 版 `Encryptor/`)。
4//!
5//! CBC + HMAC(encrypt-then-MAC)一族共用一个泛型实现 [`cbc_hmac::CbcHmacEncryptor`]:
6//! AES / Camellia / ARIA / Kuznyechik / Threefish-512 / SM4 只是泛型参数不同,
7//! 各自的历史类型名由 `cbc_hmac` 里的别名保持。
8
9mod aes256cbc;
10mod aes256gcm;
11mod aes256gcm_siv;
12mod aria256cbc;
13mod camellia256cbc;
14pub mod cbc_hmac;
15mod chacha20poly1305_ietf;
16mod kuznyechikcbc;
17mod salsa20;
18mod sodium_xchacha20;
19mod threefish512cbc;
20
21pub use aes256cbc::Aes256CbcEncryptor;
22pub use aes256gcm::Aes256GcmEncryptor;
23pub use aes256gcm_siv::Aes256GcmSivEncryptor;
24pub use aria256cbc::Aria256CbcEncryptor;
25pub use camellia256cbc::Camellia256CbcEncryptor;
26pub use chacha20poly1305_ietf::ChaCha20Poly1305IetfEncryptor;
27pub use kuznyechikcbc::Kuznyechik256CbcEncryptor;
28pub use salsa20::Salsa20Encryptor;
29pub use sodium_xchacha20::SodiumXChaCha20Encryptor;
30pub use threefish512cbc::Threefish512CbcEncryptor;