Struct cosmian_findex::EntryTable
source · pub struct EntryTable<const VALUE_LENGTH: usize, Edx: DbInterface<VALUE_LENGTH>>(pub Edx);
Expand description
Implementation of the Entry Table EDX.
Tuple Fields§
§0: Edx
Trait Implementations§
source§impl<const VALUE_LENGTH: usize, Edx: Debug + DbInterface<VALUE_LENGTH>> Debug for EntryTable<VALUE_LENGTH, Edx>
impl<const VALUE_LENGTH: usize, Edx: Debug + DbInterface<VALUE_LENGTH>> Debug for EntryTable<VALUE_LENGTH, Edx>
source§impl<const VALUE_LENGTH: usize, Edx: DbInterface<VALUE_LENGTH>> Deref for EntryTable<VALUE_LENGTH, Edx>
impl<const VALUE_LENGTH: usize, Edx: DbInterface<VALUE_LENGTH>> Deref for EntryTable<VALUE_LENGTH, Edx>
source§impl<const VALUE_LENGTH: usize, Edx: DbInterface<VALUE_LENGTH>> DxEnc<VALUE_LENGTH> for EntryTable<VALUE_LENGTH, Edx>
impl<const VALUE_LENGTH: usize, Edx: DbInterface<VALUE_LENGTH>> DxEnc<VALUE_LENGTH> for EntryTable<VALUE_LENGTH, Edx>
§type EncryptedValue = EncryptedValue<VALUE_LENGTH>
type EncryptedValue = EncryptedValue<VALUE_LENGTH>
Fixed length encrypted value stored inside the encrypted dictionary.
§type Error = Error<<Edx as DbInterface<VALUE_LENGTH>>::Error>
type Error = Error<<Edx as DbInterface<VALUE_LENGTH>>::Error>
Type of error returned by the scheme.
source§fn gen_seed(&self, rng: &mut impl CryptoRngCore) -> Self::Seed
fn gen_seed(&self, rng: &mut impl CryptoRngCore) -> Self::Seed
Generates a new random seed.
source§fn derive_keys(&self, seed: &Self::Seed) -> Self::Key
fn derive_keys(&self, seed: &Self::Seed) -> Self::Key
Deterministically derives a cryptographic key from the given seed.
source§fn tokenize(
&self,
key: &Self::Key,
bytes: &[u8],
label: Option<&Label>
) -> Token
fn tokenize( &self, key: &Self::Key, bytes: &[u8], label: Option<&Label> ) -> Token
Deterministically transforms the given bytes into a cryptographically
secure token using the given key.
source§fn get<'life0, 'async_trait>(
&'life0 self,
tokens: HashSet<Token>
) -> Pin<Box<dyn Future<Output = Result<Vec<(Token, Self::EncryptedValue)>, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
tokens: HashSet<Token>
) -> Pin<Box<dyn Future<Output = Result<Vec<(Token, Self::EncryptedValue)>, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Queries the given tokens and returns the encrypted values.
source§fn resolve(
&self,
key: &Self::Key,
encrypted_value: &Self::EncryptedValue
) -> Result<[u8; VALUE_LENGTH], Self::Error>
fn resolve( &self, key: &Self::Key, encrypted_value: &Self::EncryptedValue ) -> Result<[u8; VALUE_LENGTH], Self::Error>
Decrypts the given encrypted value with the given key.
source§fn upsert<'life0, 'async_trait>(
&'life0 self,
old_values: HashMap<Token, Self::EncryptedValue>,
new_values: HashMap<Token, Self::EncryptedValue>
) -> Pin<Box<dyn Future<Output = Result<HashMap<Token, Self::EncryptedValue>, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upsert<'life0, 'async_trait>(
&'life0 self,
old_values: HashMap<Token, Self::EncryptedValue>,
new_values: HashMap<Token, Self::EncryptedValue>
) -> Pin<Box<dyn Future<Output = Result<HashMap<Token, Self::EncryptedValue>, Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Conditionally upserts the given items into the EDX.
source§fn insert<'life0, 'async_trait>(
&'life0 self,
items: HashMap<Token, Self::EncryptedValue>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert<'life0, 'async_trait>(
&'life0 self,
items: HashMap<Token, Self::EncryptedValue>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Inserts the given items into the EDX. Read more
source§fn prepare(
&self,
rng: &mut impl CryptoRngCore,
key: &Self::Key,
value: [u8; VALUE_LENGTH]
) -> Result<Self::EncryptedValue, Self::Error>
fn prepare( &self, rng: &mut impl CryptoRngCore, key: &Self::Key, value: [u8; VALUE_LENGTH] ) -> Result<Self::EncryptedValue, Self::Error>
Encrypts the given values using the given key.
Auto Trait Implementations§
impl<const VALUE_LENGTH: usize, Edx> RefUnwindSafe for EntryTable<VALUE_LENGTH, Edx>where
Edx: RefUnwindSafe,
impl<const VALUE_LENGTH: usize, Edx> Send for EntryTable<VALUE_LENGTH, Edx>where
Edx: Send,
impl<const VALUE_LENGTH: usize, Edx> Sync for EntryTable<VALUE_LENGTH, Edx>where
Edx: Sync,
impl<const VALUE_LENGTH: usize, Edx> Unpin for EntryTable<VALUE_LENGTH, Edx>where
Edx: Unpin,
impl<const VALUE_LENGTH: usize, Edx> UnwindSafe for EntryTable<VALUE_LENGTH, Edx>where
Edx: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more