Enum CryptoAlgorithm
#[non_exhaustive]pub enum CryptoAlgorithm {
Encryption,
Signing,
}
Expand description
The two cryptographic processes that can be applied to a cookie value.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Encryption
The cookie value will be encrypted using AEAD-AES-256-GCM-SIV.
Encryption guarantees confidentiality of the value as well as its integrity.
Signing
The cookie will be signed using HMAC-SHA256.
Signing guarantees integrity of the value.
Trait Implementations§
§impl Clone for CryptoAlgorithm
impl Clone for CryptoAlgorithm
§fn clone(&self) -> CryptoAlgorithm
fn clone(&self) -> CryptoAlgorithm
Returns a copy 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 more§impl Debug for CryptoAlgorithm
impl Debug for CryptoAlgorithm
§impl<'de> Deserialize<'de> for CryptoAlgorithm
impl<'de> Deserialize<'de> for CryptoAlgorithm
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CryptoAlgorithm, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CryptoAlgorithm, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for CryptoAlgorithm
Auto Trait Implementations§
impl Freeze for CryptoAlgorithm
impl RefUnwindSafe for CryptoAlgorithm
impl Send for CryptoAlgorithm
impl Sync for CryptoAlgorithm
impl Unpin for CryptoAlgorithm
impl UnwindSafe for CryptoAlgorithm
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)