Struct serde_encrypted_value::Key
source · pub struct Key<T> { /* private fields */ }
Expand description
A key used to encrypt or decrypt values. It represents both an algorithm and a key.
Keys which have been deserialized from a string or file cannot encrypt new values; only freshly
created keys have that ability. This is indicated by the type parameter T
.
The canonical serialized representation of a Key
is a string consisting of an algorithm
identifier, followed by a :
, followed by the base64 encoded bytes of the key. The Display
and FromStr
implementations serialize and deserialize in this format.
The only algorithm currently supported is AES 256 GCM, which uses the identifier AES
.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for Key<T>where
T: RefUnwindSafe,
impl<T> Send for Key<T>where
T: Send,
impl<T> Sync for Key<T>where
T: Sync,
impl<T> Unpin for Key<T>where
T: Unpin,
impl<T> UnwindSafe for Key<T>where
T: UnwindSafe,
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