pub struct EncryptionKey { /* private fields */ }Expand description
A secure encryption key that is zeroed on drop.
Implementations§
Source§impl EncryptionKey
impl EncryptionKey
Sourcepub fn generate(length: usize) -> Self
pub fn generate(length: usize) -> Self
Generate a random encryption key of the specified length.
Sourcepub fn from_base64(encoded: &str) -> CryptoResult<Self>
pub fn from_base64(encoded: &str) -> CryptoResult<Self>
Create a key from a base64-encoded string.
Trait Implementations§
Source§impl Clone for EncryptionKey
impl Clone for EncryptionKey
Source§fn clone(&self) -> EncryptionKey
fn clone(&self) -> EncryptionKey
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 EncryptionKey
impl Debug for EncryptionKey
Source§impl Drop for EncryptionKey
impl Drop for EncryptionKey
Auto Trait Implementations§
impl Freeze for EncryptionKey
impl RefUnwindSafe for EncryptionKey
impl Send for EncryptionKey
impl Sync for EncryptionKey
impl Unpin for EncryptionKey
impl UnsafeUnpin for EncryptionKey
impl UnwindSafe for EncryptionKey
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