pub struct TokenEncryptionKey(/* private fields */);Expand description
32-byte ChaCha20-Poly1305 key. Wiped from memory on drop.
Implementations§
Source§impl TokenEncryptionKey
impl TokenEncryptionKey
Sourcepub fn from_encoded(s: &str) -> Result<Self, AuthError>
pub fn from_encoded(s: &str) -> Result<Self, AuthError>
Parse a 32-byte key from a hex (64 chars) or base64url-no-pad (43 chars) string.
Trait Implementations§
Source§impl Clone for TokenEncryptionKey
impl Clone for TokenEncryptionKey
Source§fn clone(&self) -> TokenEncryptionKey
fn clone(&self) -> TokenEncryptionKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TokenEncryptionKey
impl Debug for TokenEncryptionKey
Source§impl Drop for TokenEncryptionKey
impl Drop for TokenEncryptionKey
Source§impl PartialEq for TokenEncryptionKey
impl PartialEq for TokenEncryptionKey
Source§fn eq(&self, other: &TokenEncryptionKey) -> bool
fn eq(&self, other: &TokenEncryptionKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Zeroize for TokenEncryptionKey
impl Zeroize for TokenEncryptionKey
impl Eq for TokenEncryptionKey
impl StructuralPartialEq for TokenEncryptionKey
Auto Trait Implementations§
impl Freeze for TokenEncryptionKey
impl RefUnwindSafe for TokenEncryptionKey
impl Send for TokenEncryptionKey
impl Sync for TokenEncryptionKey
impl Unpin for TokenEncryptionKey
impl UnsafeUnpin for TokenEncryptionKey
impl UnwindSafe for TokenEncryptionKey
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more