[−][src]Struct pwbox::rcrypto::RustCrypto
This is supported on crate feature
rust-crypto
only.Suite for password-based encryption provided by rust-crypto
.
Ciphers
aes-128-ctr
: AES-128 cipher in CTR mode with Keccak256-based MACaes-128-gcm
: AES-128 cipher in GCM mode
KDFs
scrypt
:scrypt
KDF with the original parametrization (not the libsodium one)
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]
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]
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>,