pub enum EncryptionAlgorithm {
Aes256GcmSiv,
ChaCha20Poly1305,
}Expand description
Encryption algorithm selection.
Both algorithms provide 256-bit security with authenticated encryption.
Variants§
Aes256GcmSiv
AES-256-GCM-SIV — Default.
- Hardware-accelerated on modern x86/ARM (AES-NI)
- Nonce-misuse-resistant (safe even if nonce reused)
- Best for: servers, desktops, modern mobile
ChaCha20Poly1305
ChaCha20-Poly1305 (RFC 8439).
- Excellent software performance (no hardware dependency)
- Constant-time implementation (side-channel resistant)
- Best for: Embedded, platforms without AES-NI
Implementations§
Source§impl EncryptionAlgorithm
impl EncryptionAlgorithm
Sourcepub const ALL: &'static [EncryptionAlgorithm]
pub const ALL: &'static [EncryptionAlgorithm]
All supported encryption algorithms.
Trait Implementations§
Source§impl Clone for EncryptionAlgorithm
impl Clone for EncryptionAlgorithm
Source§fn clone(&self) -> EncryptionAlgorithm
fn clone(&self) -> EncryptionAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncryptionAlgorithm
impl Debug for EncryptionAlgorithm
Source§impl Default for EncryptionAlgorithm
impl Default for EncryptionAlgorithm
Source§fn default() -> EncryptionAlgorithm
fn default() -> EncryptionAlgorithm
Returns the “default value” for a type. Read more
Source§impl Display for EncryptionAlgorithm
impl Display for EncryptionAlgorithm
Source§impl Hash for EncryptionAlgorithm
impl Hash for EncryptionAlgorithm
Source§impl PartialEq for EncryptionAlgorithm
impl PartialEq for EncryptionAlgorithm
impl Copy for EncryptionAlgorithm
impl Eq for EncryptionAlgorithm
impl StructuralPartialEq for EncryptionAlgorithm
Auto Trait Implementations§
impl Freeze for EncryptionAlgorithm
impl RefUnwindSafe for EncryptionAlgorithm
impl Send for EncryptionAlgorithm
impl Sync for EncryptionAlgorithm
impl Unpin for EncryptionAlgorithm
impl UnsafeUnpin for EncryptionAlgorithm
impl UnwindSafe for EncryptionAlgorithm
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more