pub struct CredentialVault { /* private fields */ }Expand description
Encrypted credential store backed by SQLite.
Implementations§
Source§impl CredentialVault
impl CredentialVault
Sourcepub fn default_vault() -> Result<Self>
pub fn default_vault() -> Result<Self>
Open the default vault at ~/.cortex/vault.db.
Sourcepub fn store(&self, domain: &str, username: &str, password: &str) -> Result<()>
pub fn store(&self, domain: &str, username: &str, password: &str) -> Result<()>
Store credentials for a domain.
The password is encrypted with AES-256-GCM using a key from
CORTEX_VAULT_KEY_FILE or CORTEX_VAULT_KEY.
Sourcepub fn retrieve(&self, domain: &str) -> Result<Option<(String, String)>>
pub fn retrieve(&self, domain: &str) -> Result<Option<(String, String)>>
Retrieve credentials for a domain.
Sourcepub fn list_domains(&self) -> Result<Vec<String>>
pub fn list_domains(&self) -> Result<Vec<String>>
List all domains with stored credentials.
Auto Trait Implementations§
impl !Freeze for CredentialVault
impl !RefUnwindSafe for CredentialVault
impl Send for CredentialVault
impl !Sync for CredentialVault
impl Unpin for CredentialVault
impl UnsafeUnpin for CredentialVault
impl !UnwindSafe for CredentialVault
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more