veilid-core 0.5.4

Core library used to create a Veilid node and operate it as part of an application
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

// In-memory Diffie-Hellman key agreement cache
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct DHCacheKey {
    pub key: PublicKey,
    pub secret: SecretKey,
}

#[derive(Debug)]
pub struct DHCacheValue {
    pub shared_secret: SharedSecret,
}

pub type DHCache = LruCache<DHCacheKey, DHCacheValue>;
pub const DH_CACHE_SIZE: usize = 4096;