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>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<const VALUE_LENGTH: usize, Edx: DbInterface<VALUE_LENGTH>> Deref for EntryTable<VALUE_LENGTH, Edx>

§

type Target = Edx

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<const VALUE_LENGTH: usize, Edx: DbInterface<VALUE_LENGTH>> DxEnc<VALUE_LENGTH> for EntryTable<VALUE_LENGTH, Edx>

§

type EncryptedValue = EncryptedValue<VALUE_LENGTH>

Fixed length encrypted value stored inside the encrypted dictionary.
§

type Error = Error<<Edx as DbInterface<VALUE_LENGTH>>::Error>

Type of error returned by the scheme.
§

type Key = EdxKey

Cryptographically secure key.
§

type Seed = Seed<SEED_LENGTH>

Seed used to derive the key.
§

type Database = Edx

Backend storage.
source§

fn setup(edx: Self::Database) -> Self

Instantiates a new Dx-Enc scheme.
source§

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

Deterministically derives a cryptographic key from the given seed.
source§

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,

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>

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,

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,

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>

Encrypts the given values using the given key.
source§

fn delete<'life0, 'async_trait>( &'life0 self, items: HashSet<Token> ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Deletes the given items from the EDX.

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more