Struct ethstore::Crypto [−][src]
Encrypted data
Fields
cipher: Cipher
Encryption parameters
ciphertext: Vec<u8>
Encrypted data buffer
kdf: Kdf
Key derivation function parameters
mac: [u8; 32]
Message authentication code
Methods
impl Crypto
[src]
impl Crypto
pub fn with_secret(
secret: &Secret,
password: &Password,
iterations: u32
) -> Result<Self, Error>
[src]
pub fn with_secret(
secret: &Secret,
password: &Password,
iterations: u32
) -> Result<Self, Error>
Encrypt account secret
pub fn with_plain(
plain: &[u8],
password: &Password,
iterations: u32
) -> Result<Self, Error>
[src]
pub fn with_plain(
plain: &[u8],
password: &Password,
iterations: u32
) -> Result<Self, Error>
Encrypt custom plain data
pub fn secret(&self, password: &Password) -> Result<Secret, Error>
[src]
pub fn secret(&self, password: &Password) -> Result<Secret, Error>
Try to decrypt and convert result to account secret
pub fn decrypt(&self, password: &Password) -> Result<Vec<u8>, Error>
[src]
pub fn decrypt(&self, password: &Password) -> Result<Vec<u8>, Error>
Try to decrypt and return result as is
Trait Implementations
impl Debug for Crypto
[src]
impl Debug for Crypto
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Crypto
[src]
impl PartialEq for Crypto
fn eq(&self, other: &Crypto) -> bool
[src]
fn eq(&self, other: &Crypto) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Crypto) -> bool
[src]
fn ne(&self, other: &Crypto) -> bool
This method tests for !=
.
impl Clone for Crypto
[src]
impl Clone for Crypto
fn clone(&self) -> Crypto
[src]
fn clone(&self) -> Crypto
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl FromStr for Crypto
[src]
impl FromStr for Crypto
type Err = <Crypto as FromStr>::Err
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a string s
to return a value of this type. Read more
impl From<Crypto> for String
[src]
impl From<Crypto> for String