more work

This commit is contained in:
John Smith
2023-02-13 21:12:27 -05:00
parent 1d8e2d3fda
commit f11dc8aaac
11 changed files with 111 additions and 103 deletions

View File

@@ -29,6 +29,9 @@ pub type CryptoSystemVersion = Arc<dyn CryptoSystem + Send + Sync>;
/// Crypto kinds in order of preference, best cryptosystem is the first one, worst is the last one
pub const VALID_CRYPTO_KINDS: [CryptoKind; 1] = [CRYPTO_KIND_VLD0];
/// Number of cryptosystem signatures to keep on structures if many are present beyond the ones we consider valid
pub const MAX_CRYPTO_KINDS: usize = 3;
/// Return the best cryptosystem kind we support
pub fn best_crypto_kind() -> CryptoKind {
VALID_CRYPTO_KINDS[0]
}
@@ -87,6 +90,10 @@ impl Crypto {
out
}
pub fn config(&self) -> VeilidConfig {
self.unlocked_inner.config.clone()
}
pub async fn init(&self) -> EyreResult<()> {
trace!("Crypto::init");
let table_store = self.unlocked_inner.table_store.clone();