AddPlaintext

Trait AddPlaintext 

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

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

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

A trait used to add a plaintext to a certain type. Commonly used to correct shares after a masked opening, or to add a public constant

Required Associated Types§

Required Methods§

Source

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

Add a plaintext to the share.

Provided Methods§

Source

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

Add a plaintext 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§