pub struct SecureKeystore;Expand description
Secure hardware enclave abstraction storing encrypted credentials.
Implementations§
Source§impl SecureKeystore
impl SecureKeystore
Sourcepub fn set_keystore_path(path: PathBuf)
pub fn set_keystore_path(path: PathBuf)
Sets a custom path for the encrypted keystore file (used in tests).
Sourcepub fn clear_keystore_path()
pub fn clear_keystore_path()
Clears any custom keystore path.
Sourcepub fn set_secret(key: &str, value: &[u8]) -> Result<(), KeystoreError>
pub fn set_secret(key: &str, value: &[u8]) -> Result<(), KeystoreError>
Stores a secret key/value pair securely into the enclave.
Sourcepub fn get_secret(key: &str) -> Result<Option<Vec<u8>>, KeystoreError>
pub fn get_secret(key: &str) -> Result<Option<Vec<u8>>, KeystoreError>
Retrieves an existing secret from the enclave.
Sourcepub fn delete_secret(key: &str) -> Result<bool, KeystoreError>
pub fn delete_secret(key: &str) -> Result<bool, KeystoreError>
Deletes a secret key/value pair from the enclave.
Sourcepub fn has_secret(key: &str) -> bool
pub fn has_secret(key: &str) -> bool
Checks if a secret identifier exists in the enclave.
Auto Trait Implementations§
impl Forget for SecureKeystore
impl Freeze for SecureKeystore
impl Move for SecureKeystore
impl RefUnwindSafe for SecureKeystore
impl Send for SecureKeystore
impl Sync for SecureKeystore
impl Unpin for SecureKeystore
impl UnsafeUnpin for SecureKeystore
impl UnwindSafe for SecureKeystore
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