Trait vapstore::SimpleSecretStore [−][src]
Simple Secret Store API
Required methods
fn insert_account(
&self,
vault: SecretVaultRef,
secret: Secret,
password: &Password
) -> Result<StoreAccountRef, Error>
[src]
&self,
vault: SecretVaultRef,
secret: Secret,
password: &Password
) -> Result<StoreAccountRef, Error>
Inserts new accounts to the store (or vault) with given password.
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>
Inserts new derived account to the store (or vault) with given password.
fn change_password(
&self,
account: &StoreAccountRef,
old_password: &Password,
new_password: &Password
) -> Result<(), Error>
[src]
&self,
account: &StoreAccountRef,
old_password: &Password,
new_password: &Password
) -> Result<(), Error>
Changes accounts password.
fn export_account(
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<OpaqueKeyFile, Error>
[src]
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<OpaqueKeyFile, Error>
Exports key details for account.
fn remove_account(
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<(), Error>
[src]
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<(), Error>
Entirely removes account from the store and underlying storage.
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>
Generates new derived account.
fn sign(
&self,
account: &StoreAccountRef,
password: &Password,
message: &Message
) -> Result<Signature, Error>
[src]
&self,
account: &StoreAccountRef,
password: &Password,
message: &Message
) -> Result<Signature, Error>
Sign a message with given account.
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>
Sign a message with derived account.
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>
Decrypt a messages with given account.
fn agree(
&self,
account: &StoreAccountRef,
password: &Password,
other: &Public
) -> Result<Secret, Error>
[src]
&self,
account: &StoreAccountRef,
password: &Password,
other: &Public
) -> Result<Secret, Error>
Agree on shared key.
fn accounts(&self) -> Result<Vec<StoreAccountRef>, Error>
[src]
Returns all accounts in this secret store.
fn account_ref(&self, address: &Address) -> Result<StoreAccountRef, Error>
[src]
Get reference to some account with given address. This method could be removed if we will guarantee that there is max(1) account for given address.
fn create_vault(&self, name: &str, password: &Password) -> Result<(), Error>
[src]
Create new vault with given password
fn open_vault(&self, name: &str, password: &Password) -> Result<(), Error>
[src]
Open vault with given password
fn close_vault(&self, name: &str) -> Result<(), Error>
[src]
Close vault
fn list_vaults(&self) -> Result<Vec<String>, Error>
[src]
List all vaults
fn list_opened_vaults(&self) -> Result<Vec<String>, Error>
[src]
List all currently opened vaults
fn change_vault_password(
&self,
name: &str,
new_password: &Password
) -> Result<(), Error>
[src]
&self,
name: &str,
new_password: &Password
) -> Result<(), Error>
Change vault password
fn change_account_vault(
&self,
vault: SecretVaultRef,
account: StoreAccountRef
) -> Result<StoreAccountRef, Error>
[src]
&self,
vault: SecretVaultRef,
account: StoreAccountRef
) -> Result<StoreAccountRef, Error>
Cnage account’ vault
fn get_vault_meta(&self, name: &str) -> Result<String, Error>
[src]
Get vault metadata string.
fn set_vault_meta(&self, name: &str, meta: &str) -> Result<(), Error>
[src]
Set vault metadata string.
Implementors
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]
impl SimpleSecretStore for VapStore
[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 account_ref(&self, address: &Address) -> Result<StoreAccountRef, Error>
[src]
fn accounts(&self) -> Result<Vec<StoreAccountRef>, Error>
[src]
fn change_password(
&self,
account: &StoreAccountRef,
old_password: &Password,
new_password: &Password
) -> Result<(), Error>
[src]
&self,
account: &StoreAccountRef,
old_password: &Password,
new_password: &Password
) -> Result<(), Error>
fn export_account(
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<OpaqueKeyFile, Error>
[src]
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<OpaqueKeyFile, Error>
fn remove_account(
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<(), Error>
[src]
&self,
account: &StoreAccountRef,
password: &Password
) -> Result<(), 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 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 agree(
&self,
account: &StoreAccountRef,
password: &Password,
other: &Public
) -> Result<Secret, Error>
[src]
&self,
account: &StoreAccountRef,
password: &Password,
other: &Public
) -> Result<Secret, 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 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: StoreAccountRef
) -> Result<StoreAccountRef, Error>
[src]
&self,
vault: SecretVaultRef,
account: StoreAccountRef
) -> Result<StoreAccountRef, Error>