[−][src]Struct pwbox::pure::PureCrypto
This is supported on crate feature
pure
only.Suite for password-based encryption provided by pure-Rust crypto primitives.
Ciphers
chacha20-poly1305
: ChaCha20 stream cipher with Poly1305 MAC
KDFs
scrypt
:scrypt
KDF with the original paper parametrization.
Examples
This suite can be used in constrained environments, e.g., WASM.
use rand::thread_rng; use pwbox::{Eraser, ErasedPwBox, Suite, pure::PureCrypto}; // Create a new box. let pwbox = PureCrypto::build_box(&mut thread_rng()) .seal(b"correct horse", b"battery staple") .unwrap(); // Read from existing box. let mut eraser = Eraser::new(); eraser.add_suite::<PureCrypto>(); let erased: ErasedPwBox = // deserialized from some format let plaintext = eraser.restore(&erased)?.open(b"correct horse")?;
Trait Implementations
impl Debug for PureCrypto
[src]
impl Suite for PureCrypto
[src]
Auto Trait Implementations
impl RefUnwindSafe for PureCrypto
impl Send for PureCrypto
impl Sync for PureCrypto
impl Unpin for PureCrypto
impl UnwindSafe for PureCrypto
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> 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, 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>,