#[repr(u8)]pub enum CipherId {
ChaCha20Poly1305 = 1,
Aes256Gcm = 2,
}Expand description
AEAD 算法选择。
Variants§
ChaCha20Poly1305 = 1
ChaCha20-Poly1305(RFC 8439),12 字节 nonce。
参考实现与测试向量使用此算法。生产默认为 XChaCha20-Poly1305(24 字节 nonce),
目前尚未实现,见 docs/research/02-file-format-spec.md §5.2 的说明。
Aes256Gcm = 2
AES-256-GCM。有 AES-NI 硬件加速时更快。
Implementations§
Trait Implementations§
impl Copy for CipherId
impl Eq for CipherId
impl StructuralPartialEq for CipherId
Auto Trait Implementations§
impl Forget for CipherId
impl Freeze for CipherId
impl RefUnwindSafe for CipherId
impl Send for CipherId
impl Sync for CipherId
impl Unpin for CipherId
impl UnsafeUnpin for CipherId
impl UnwindSafe for CipherId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more