[][src]Trait bacon_cipher::Steganographer

pub trait Steganographer {
    type T;
    fn disguise<AB>(
        &self,
        secret: &[Self::T],
        public: &[Self::T],
        codec: &dyn BaconCodec<ABTYPE = AB, CONTENT = Self::T>
    ) -> Result<Vec<Self::T>>;
fn reveal<AB>(
        &self,
        input: &[Self::T],
        codec: &dyn BaconCodec<ABTYPE = AB, CONTENT = Self::T>
    ) -> Result<Vec<Self::T>>; }

Transforms a given input of elements to / from a different form, based on a BaconCodec.

Associated Types

type T

The type of the elements to transform.

Loading content...

Required methods

fn disguise<AB>(
    &self,
    secret: &[Self::T],
    public: &[Self::T],
    codec: &dyn BaconCodec<ABTYPE = AB, CONTENT = Self::T>
) -> Result<Vec<Self::T>>

Encodes a secret array of type T, using the a BaconCodec and applies the encoding by transforming a public array of type T accordingly.

The result is an array of type T that contains the hidden secret

fn reveal<AB>(
    &self,
    input: &[Self::T],
    codec: &dyn BaconCodec<ABTYPE = AB, CONTENT = Self::T>
) -> Result<Vec<Self::T>>

Reveals the secret that is hidden in an array of type T, using a BaconCodec.

Loading content...

Implementors

impl Steganographer for LetterCaseSteganographer[src]

type T = char

Loading content...