Trait libsignal_service::master_key::MasterKeyStore
source · pub trait MasterKeyStore {
// Required methods
fn fetch_master_key(&self) -> Option<MasterKey>;
fn fetch_storage_service_key(&self) -> Option<StorageServiceKey>;
fn store_master_key(&self, master_key: Option<&MasterKey>);
fn store_storage_service_key(&self, storage_key: Option<&StorageServiceKey>);
}
Expand description
Storage trait for handling MasterKey and StorageKey.
Required Methods§
sourcefn fetch_master_key(&self) -> Option<MasterKey>
fn fetch_master_key(&self) -> Option<MasterKey>
Fetch the master key from the store if it exists.
sourcefn fetch_storage_service_key(&self) -> Option<StorageServiceKey>
fn fetch_storage_service_key(&self) -> Option<StorageServiceKey>
Fetch the storage service key from the store if it exists.
sourcefn store_master_key(&self, master_key: Option<&MasterKey>)
fn store_master_key(&self, master_key: Option<&MasterKey>)
Save (or clear) the master key to the store.
sourcefn store_storage_service_key(&self, storage_key: Option<&StorageServiceKey>)
fn store_storage_service_key(&self, storage_key: Option<&StorageServiceKey>)
Save (or clear) the storage service key to the store.