[][src]Struct pwbox::rcrypto::RustCrypto

pub struct RustCrypto(_);
This is supported on crate feature rust-crypto only.

Suite for password-based encryption provided by rust-crypto.

Ciphers

KDFs

Examples

This suite can be used for compatibility with Ethereum keystores.

use rand::thread_rng;
use pwbox::{Eraser, ErasedPwBox, Suite, rcrypto::RustCrypto};

// Create a new box.
let pwbox = RustCrypto::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::<RustCrypto>();
let erased: ErasedPwBox = // deserialized from some format
let plaintext = eraser.restore(&erased)?.open(b"correct horse")?;

Trait Implementations

impl Debug for RustCrypto[src]

impl Suite for RustCrypto[src]

type Cipher = CipherWithMac<Aes128Ctr, Keccak256>

Recommended cipher for this suite.

type DeriveKey = Scrypt

Recommended KDF for this suite.

Auto Trait Implementations

impl RefUnwindSafe for RustCrypto

impl Send for RustCrypto

impl Sync for RustCrypto

impl Unpin for RustCrypto

impl UnwindSafe for RustCrypto

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.