Struct vapstore::VapMultiStore [−][src]
Similar to VapStore
but may store many accounts (with different passwords) for the same Address
Implementations
impl VapMultiStore
[src]
pub fn open(directory: Box<dyn KeyDirectory>) -> Result<Self, Error>
[src]
Open new multi-accounts store with given key directory backend.
pub fn open_with_iterations(
directory: Box<dyn KeyDirectory>,
iterations: u32
) -> Result<Self, Error>
[src]
directory: Box<dyn KeyDirectory>,
iterations: u32
) -> Result<Self, Error>
Open new multi-accounts store with given key directory backend and custom number of iterations for new keys.
pub fn set_refresh_time(&self, time: Duration)
[src]
Modify account refresh timeout - how often they are re-read from KeyDirectory
.
Setting this to low values (or 0) will cause new accounts to be picked up quickly, although it may induce heavy disk reads and is not recommended if you manage many keys (say over 10k).
By default refreshing is disabled, so only accounts created using this instance of VapStore
are taken into account.
Trait Implementations
impl SimpleSecretStore for VapMultiStore
[src]
fn insert_account(
&self,
vault: SecretVaultRef,
secret: Secret,
password: &Password
) -> Result<StoreAccountRef, Error>
[src]
&self,
vault: SecretVaultRef,
secret: Secret,
password: &Password
) -> Result<StoreAccountRef, Error>
fn insert_derived(
&self,
vault: SecretVaultRef,
account_ref: &StoreAccountRef,
password: &Password,
derivation: Derivation
) -> Result<StoreAccountRef, Error>
[src]
&self,
vault: SecretVaultRef,
account_ref: &StoreAccountRef,
password: &Password,
derivation: Derivation
) -> Result<StoreAccountRef, Error>
fn generate_derived(
&self,
account_ref: &StoreAccountRef,
password: &Password,
derivation: Derivation
) -> Result<Address, Error>
[src]
&self,
account_ref: &StoreAccountRef,
password: &Password,
derivation: Derivation
) -> Result<Address, Error>
fn sign_derived(
&self,
account_ref: &StoreAccountRef,
password: &Password,
derivation: Derivation,
message: &Message
) -> Result<Signature, Error>
[src]
&self,
account_ref: &StoreAccountRef,
password: &Password,
derivation: Derivation,
message: &Message
) -> Result<Signature, Error>
fn account_ref(&self, address: &Address) -> Result<StoreAccountRef, Error>
[src]
fn accounts(&self) -> Result<Vec<StoreAccountRef>, Error>
[src]
fn remove_account(
&self,
account_ref: &StoreAccountRef,
password: &Password
) -> Result<(), Error>
[src]
&self,
account_ref: &StoreAccountRef,
password: &Password
) -> Result<(), Error>
fn change_password(
&self,
account_ref: &StoreAccountRef,
old_password: &Password,
new_password: &Password
) -> Result<(), Error>
[src]
&self,
account_ref: &StoreAccountRef,
old_password: &Password,
new_password: &Password
) -> Result<(), Error>
fn export_account(
&self,
account_ref: &StoreAccountRef,
password: &Password
) -> Result<OpaqueKeyFile, Error>
[src]
&self,
account_ref: &StoreAccountRef,
password: &Password
) -> Result<OpaqueKeyFile, Error>
fn sign(
&self,
account: &StoreAccountRef,
password: &Password,
message: &Message
) -> Result<Signature, Error>
[src]
&self,
account: &StoreAccountRef,
password: &Password,
message: &Message
) -> Result<Signature, Error>
fn decrypt(
&self,
account: &StoreAccountRef,
password: &Password,
shared_mac: &[u8],
message: &[u8]
) -> Result<Vec<u8>, Error>
[src]
&self,
account: &StoreAccountRef,
password: &Password,
shared_mac: &[u8],
message: &[u8]
) -> Result<Vec<u8>, Error>
fn agree(
&self,
account: &StoreAccountRef,
password: &Password,
other: &Public
) -> Result<Secret, Error>
[src]
&self,
account: &StoreAccountRef,
password: &Password,
other: &Public
) -> Result<Secret, Error>
fn create_vault(&self, name: &str, password: &Password) -> Result<(), Error>
[src]
fn open_vault(&self, name: &str, password: &Password) -> Result<(), Error>
[src]
fn close_vault(&self, name: &str) -> Result<(), Error>
[src]
fn list_vaults(&self) -> Result<Vec<String>, Error>
[src]
fn list_opened_vaults(&self) -> Result<Vec<String>, Error>
[src]
fn change_vault_password(
&self,
name: &str,
new_password: &Password
) -> Result<(), Error>
[src]
&self,
name: &str,
new_password: &Password
) -> Result<(), Error>
fn change_account_vault(
&self,
vault: SecretVaultRef,
account_ref: StoreAccountRef
) -> Result<StoreAccountRef, Error>
[src]
&self,
vault: SecretVaultRef,
account_ref: StoreAccountRef
) -> Result<StoreAccountRef, Error>
fn get_vault_meta(&self, name: &str) -> Result<String, Error>
[src]
fn set_vault_meta(&self, name: &str, meta: &str) -> Result<(), Error>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for VapMultiStore
impl Send for VapMultiStore
impl Sync for VapMultiStore
impl Unpin for VapMultiStore
impl !UnwindSafe for VapMultiStore
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,