[][src]Struct pwbox::pure::PureCrypto

pub struct PureCrypto(_);
This is supported on crate feature pure only.

Suite for password-based encryption provided by pure-Rust crypto primitives.

Ciphers

KDFs

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]

type Cipher = ChaCha20Poly1305

Recommended cipher for this suite.

type DeriveKey = Scrypt

Recommended KDF for this suite.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.