use crate::{bits::Bits, hashable::Hashable};
pub mod garbled_bf;
pub mod garbled_ct;
pub mod paxos;
pub trait Okvs<V: Bits>: Sized {
fn encode<K: Hashable>(key_value_pairs: &[(K, V)], lambda: usize) -> Self {
loop {
let result = Self::try_encode(key_value_pairs, lambda);
if let Some(okvs) = result {
return okvs;
}
}
}
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;
}