AddPlaintext

Trait AddPlaintext 

Source
pub trait AddPlaintext: Reconstructible {
    type AssociatedInformation: Clone + Send + Sync;

    // Required method
    fn add_plaintext(
        &self,
        plaintext: &Self::Secret,
        assoc: Self::AssociatedInformation,
    ) -> Self;

    // Provided method
    fn add_plaintext_owned(
        self,
        plaintext: &Self::Secret,
        assoc: Self::AssociatedInformation,
    ) -> Self { ... }
}
Expand description

A trait used to add a plaintext secret to its secret-shared (reconstructible) form.

Required Associated Types§

Source

type AssociatedInformation: Clone + Send + Sync

Helper information to be used when adding a constant to the share. For example in BDOZ shares, you need to know whether the local peer is the first peer or not.

Required Methods§

Source

fn add_plaintext( &self, plaintext: &Self::Secret, assoc: Self::AssociatedInformation, ) -> Self

Add a constant to the share.

Provided Methods§

Source

fn add_plaintext_owned( self, plaintext: &Self::Secret, assoc: Self::AssociatedInformation, ) -> Self

Add a constant to the share, consuming the share and returning a new one.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§