Trait okvs::schemes::Okvs

source ·
pub trait Okvs<V: Bits>: Sized {
    fn try_encode<K: Hashable>(
        key_value_pairs: &[(K, V)],
        lambda: usize
    ) -> Option<Self>; fn decode<K: Hashable>(&self, key: &K) -> V; fn to_bytes(self) -> Vec<u8>; fn from_bytes(bytes: &[u8]) -> Self; fn encode<K: Hashable>(key_value_pairs: &[(K, V)], lambda: usize) -> Self { ... } }

Required Methods§

Encodes the OKVS. The security parameters is lambda, which represents the maximum false positive probability.

Provided Methods§

Keeps trying Self::try_encode until a solution is found.