pub mod fb128;
use crate::{BlockOps, Encode, FieldOps};
use crypto_bigint::{ArrayEncoding, Bounded, RandomMod};
use std::sync::RwLock;
use std::marker::Sync;
pub struct FBObj<T> {
pub(crate) c: RwLock<Vec<T>>,
pub(crate) r: Vec<T>,
}
pub trait FBObjTrait<T> {
fn cipher(&self) -> &RwLock<Vec<T>>;
fn keybase(&self) -> &Vec<T>;
}
impl<T> FBObjTrait<T> for FBObj<T> {
fn cipher(&self) -> &RwLock<Vec<T>> {
&self.c
}
fn keybase(&self) -> &Vec<T> {
&self.r
}
}
impl<T> BlockOps<T> for FBObj<T>
where
T: FieldOps + RandomMod + Send + Sync
{}
impl<T> Encode<T> for FBObj<T>
where
T: ArrayEncoding + Bounded
{}