Struct ethstore::SafeAccount
[−]
[src]
pub struct SafeAccount { pub id: [u8; 16], pub version: Version, pub address: Address, pub crypto: Crypto, pub filename: Option<String>, pub name: String, pub meta: String, }
Fields
id: [u8; 16]
version: Version
address: Address
crypto: Crypto
filename: Option<String>
name: String
meta: String
Methods
impl SafeAccount
[src]
fn create(keypair: &KeyPair,
id: [u8; 16],
password: &str,
iterations: u32,
name: String,
meta: String)
-> Self
id: [u8; 16],
password: &str,
iterations: u32,
name: String,
meta: String)
-> Self
fn from_file(json: KeyFile, filename: Option<String>) -> Self
Create a new SafeAccount
from the given json
; if it was read from a
file, the filename
should be Some
name. If it is as yet anonymous, then it
can be left None
.
fn from_vault_file(password: &str,
json: VaultKeyFile,
filename: Option<String>)
-> Result<Self, Error>
json: VaultKeyFile,
filename: Option<String>)
-> Result<Self, Error>
Create a new SafeAccount
from the given vault json
; if it was read from a
file, the filename
should be Some
name. If it is as yet anonymous, then it
can be left None
.
fn into_vault_file(self,
iterations: u32,
password: &str)
-> Result<VaultKeyFile, Error>
iterations: u32,
password: &str)
-> Result<VaultKeyFile, Error>
Create a new VaultKeyFile
from the given self
fn sign(&self, password: &str, message: &Message) -> Result<Signature, Error>
fn decrypt(&self,
password: &str,
shared_mac: &[u8],
message: &[u8])
-> Result<Vec<u8>, Error>
password: &str,
shared_mac: &[u8],
message: &[u8])
-> Result<Vec<u8>, Error>
fn public(&self, password: &str) -> Result<Public, Error>
fn change_password(&self,
old_password: &str,
new_password: &str,
iterations: u32)
-> Result<Self, Error>
old_password: &str,
new_password: &str,
iterations: u32)
-> Result<Self, Error>
fn check_password(&self, password: &str) -> bool
Trait Implementations
impl Debug for SafeAccount
[src]
impl PartialEq for SafeAccount
[src]
fn eq(&self, __arg_0: &SafeAccount) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SafeAccount) -> bool
This method tests for !=
.
impl Clone for SafeAccount
[src]
fn clone(&self) -> SafeAccount
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Into<KeyFile> for SafeAccount
[src]
fn into(self) -> KeyFile
Performs the conversion.