pub struct MetaLairClient(/* private fields */);Expand description
Abstraction around runtime switching/upgrade of lair keystore / client.
Implementations§
Source§impl MetaLairClient
impl MetaLairClient
Sourcepub async fn from_client(client: LairClient) -> LairResult<Self>
pub async fn from_client(client: LairClient) -> LairResult<Self>
Create a MetaLairClient from a LairClient
Sourcepub fn lair_client(&self) -> LairClient
pub fn lair_client(&self) -> LairClient
Get the raw underlying lair client instance.
Sourcepub fn shutdown(&self) -> impl Future<Output = LairResult<()>> + 'static + Send
pub fn shutdown(&self) -> impl Future<Output = LairResult<()>> + 'static + Send
Shutdown this keystore client
Sourcepub fn new_sign_keypair_random(
&self,
) -> impl Future<Output = LairResult<AgentPubKey>> + 'static + Send
pub fn new_sign_keypair_random( &self, ) -> impl Future<Output = LairResult<AgentPubKey>> + 'static + Send
Construct a new randomized signature keypair
Sourcepub fn sign(
&self,
pub_key: AgentPubKey,
data: Arc<[u8]>,
) -> impl Future<Output = LairResult<Signature>> + 'static + Send
pub fn sign( &self, pub_key: AgentPubKey, data: Arc<[u8]>, ) -> impl Future<Output = LairResult<Signature>> + 'static + Send
Generate a new signature for given keypair / data
Construct a new randomized shared secret, associated with given tag
Export a shared secret identified by tag using box encryption.
Sourcepub fn list_public_keys(
&self,
) -> impl Future<Output = LairResult<Vec<AgentPubKey>>> + 'static + Send
pub fn list_public_keys( &self, ) -> impl Future<Output = LairResult<Vec<AgentPubKey>>> + 'static + Send
Retrieve a list of the AgentPubKey values which are stored in the keystore available for use.
Import a shared secret to be indentified by tag using box decryption.
Encrypt using a shared secret / xsalsa20poly1305 secretbox.
Decrypt using a shared secret / xsalsa20poly1305 secretbox.
Sourcepub fn new_x25519_keypair_random(
&self,
) -> impl Future<Output = LairResult<X25519PubKey>> + 'static + Send
pub fn new_x25519_keypair_random( &self, ) -> impl Future<Output = LairResult<X25519PubKey>> + 'static + Send
Construct a new randomized encryption keypair
Sourcepub fn crypto_box_xsalsa(
&self,
sender_pub_key: X25519PubKey,
recipient_pub_key: X25519PubKey,
data: Arc<[u8]>,
) -> impl Future<Output = LairResult<([u8; 24], Arc<[u8]>)>> + 'static + Send
pub fn crypto_box_xsalsa( &self, sender_pub_key: X25519PubKey, recipient_pub_key: X25519PubKey, data: Arc<[u8]>, ) -> impl Future<Output = LairResult<([u8; 24], Arc<[u8]>)>> + 'static + Send
Encrypt an authenticated “box“ed message to a specific recipient.
Sourcepub fn crypto_box_xsalsa_open(
&self,
sender_pub_key: X25519PubKey,
recipient_pub_key: X25519PubKey,
nonce: [u8; 24],
data: Arc<[u8]>,
) -> impl Future<Output = LairResult<Arc<[u8]>>> + 'static + Send
pub fn crypto_box_xsalsa_open( &self, sender_pub_key: X25519PubKey, recipient_pub_key: X25519PubKey, nonce: [u8; 24], data: Arc<[u8]>, ) -> impl Future<Output = LairResult<Arc<[u8]>>> + 'static + Send
Decrypt an authenticated “box“ed message from a specific sender.
Sourcepub fn get_or_create_tls_cert_by_tag(
&self,
tag: Arc<str>,
) -> impl Future<Output = LairResult<(CertDigest, Arc<[u8]>, LockedArray)>> + 'static + Send
pub fn get_or_create_tls_cert_by_tag( &self, tag: Arc<str>, ) -> impl Future<Output = LairResult<(CertDigest, Arc<[u8]>, LockedArray)>> + 'static + Send
Get a tls cert from lair for use in conductor
Trait Implementations§
Source§impl Clone for MetaLairClient
impl Clone for MetaLairClient
Source§fn clone(&self) -> MetaLairClient
fn clone(&self) -> MetaLairClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more