[−][src]Struct pwbox::ErasedPwBox
Password-encrypted box suitable for (de)serialization.
Serialization
When used with a human-readable format (JSON, YAML, TOML, ...), the pwbox
is serialized as the following structure:
const TOML: &str = r#" ciphertext = 'cd9d2fb2355d8c60d92dcc860abc0c4b20ddd12dd52a4dd53caca0a2f87f7f5f' mac = '83ae22646d7834f254caea78862eafda' kdf = 'scrypt-nacl' cipher = 'xsalsa20-poly1305' [kdfparams] salt = '87d68fb57d9c2331cf2bd9fdd7551057798bd36d0d2999481311cfae39863691' memlimit = 16777216 opslimit = 524288 [cipherparams] iv = 'db39c466e2f8ae7fbbc857df48d99254017b059624af7106' "#; let pwbox = toml::from_str(TOML).unwrap(); let pwbox = Eraser::new().add_suite::<Sodium>().restore(&pwbox).unwrap(); assert!(pwbox.open("correct horse battery staple").is_ok());
Implementations
impl ErasedPwBox
[src]
Trait Implementations
impl Clone for ErasedPwBox
[src]
fn clone(&self) -> ErasedPwBox
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ErasedPwBox
[src]
impl<'de> Deserialize<'de> for ErasedPwBox
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for ErasedPwBox
[src]
Auto Trait Implementations
impl RefUnwindSafe for ErasedPwBox
impl Send for ErasedPwBox
impl Sync for ErasedPwBox
impl Unpin for ErasedPwBox
impl UnwindSafe for ErasedPwBox
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,