Struct lair_keystore_api::lair_store::LairStore
source · pub struct LairStore(pub Arc<dyn AsLairStore>);
Expand description
A handle to a running lair keystore backend persistance instance. Allows storing, listing, and retrieving keystore secrets.
Tuple Fields§
§0: Arc<dyn AsLairStore>
Implementations§
source§impl LairStore
impl LairStore
sourcepub fn get_bidi_ctx_key(&self) -> BufReadSized<32>
pub fn get_bidi_ctx_key(&self) -> BufReadSized<32>
Return the context key for both encryption and decryption of secret data within the store that is NOT deep_locked.
sourcepub fn insert_seed(
&self,
seed: BufReadSized<32>,
tag: Arc<str>,
exportable: bool
) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send
pub fn insert_seed( &self, seed: BufReadSized<32>, tag: Arc<str>, exportable: bool ) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send
Inject a pre-generated seed, and associate it with the given tag, returning the seed_info derived from the generated seed.
sourcepub fn new_seed(
&self,
tag: Arc<str>,
exportable: bool
) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send
pub fn new_seed( &self, tag: Arc<str>, exportable: bool ) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send
Generate a new cryptographically secure random seed, and associate it with the given tag, returning the seed_info derived from the generated seed.
sourcepub fn insert_deep_locked_seed(
&self,
seed: BufReadSized<32>,
tag: Arc<str>,
ops_limit: u32,
mem_limit: u32,
deep_lock_passphrase: BufReadSized<64>,
exportable: bool
) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send
pub fn insert_deep_locked_seed( &self, seed: BufReadSized<32>, tag: Arc<str>, ops_limit: u32, mem_limit: u32, deep_lock_passphrase: BufReadSized<64>, exportable: bool ) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send
Inject a pre-generated seed, and associate it with the given tag, returning the seed_info derived from the generated seed. This seed is deep_locked, meaning it needs an additional runtime passphrase to be decrypted / used.
sourcepub fn new_deep_locked_seed(
&self,
tag: Arc<str>,
ops_limit: u32,
mem_limit: u32,
deep_lock_passphrase: BufReadSized<64>,
exportable: bool
) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send
pub fn new_deep_locked_seed( &self, tag: Arc<str>, ops_limit: u32, mem_limit: u32, deep_lock_passphrase: BufReadSized<64>, exportable: bool ) -> impl Future<Output = LairResult<SeedInfo>> + 'static + Send
Generate a new cryptographically secure random seed, and associate it with the given tag, returning the seed_info derived from the generated seed. This seed is deep_locked, meaning it needs an additional runtime passphrase to be decrypted / used.
sourcepub fn new_wka_tls_cert(
&self,
tag: Arc<str>
) -> impl Future<Output = LairResult<CertInfo>> + 'static + Send
pub fn new_wka_tls_cert( &self, tag: Arc<str> ) -> impl Future<Output = LairResult<CertInfo>> + 'static + Send
Generate a new cryptographically secure random wka tls cert, and associate it with the given tag, returning the cert_info derived from the generated cert.
sourcepub fn list_entries(
&self
) -> impl Future<Output = LairResult<Vec<LairEntryInfo>>> + 'static + Send
pub fn list_entries( &self ) -> impl Future<Output = LairResult<Vec<LairEntryInfo>>> + 'static + Send
List the entries tracked by the lair store.
sourcepub fn get_entry_by_tag(
&self,
tag: Arc<str>
) -> impl Future<Output = LairResult<LairEntry>> + 'static + Send
pub fn get_entry_by_tag( &self, tag: Arc<str> ) -> impl Future<Output = LairResult<LairEntry>> + 'static + Send
Get an entry from the lair store by tag.
sourcepub fn get_entry_by_ed25519_pub_key(
&self,
ed25519_pub_key: Ed25519PubKey
) -> impl Future<Output = LairResult<LairEntry>> + 'static + Send
pub fn get_entry_by_ed25519_pub_key( &self, ed25519_pub_key: Ed25519PubKey ) -> impl Future<Output = LairResult<LairEntry>> + 'static + Send
Get an entry from the lair store by ed25519 pub key.
sourcepub fn get_entry_by_x25519_pub_key(
&self,
x25519_pub_key: X25519PubKey
) -> impl Future<Output = LairResult<LairEntry>> + 'static + Send
pub fn get_entry_by_x25519_pub_key( &self, x25519_pub_key: X25519PubKey ) -> impl Future<Output = LairResult<LairEntry>> + 'static + Send
Get an entry from the lair store by x25519 pub key.