Trait false_bottom::Encode

source ·
pub trait Encode {
    // Required methods
    fn to_bytes(&self) -> (Vec<u8>, Vec<u8>);
    fn from_bytes(cipher: &[u8], keybase: &[u8]) -> Result<Self, FbError>
       where Self: Sized;
}
Expand description

Provides methods to encode and decode data to and from several formats.

Required Methods§

source

fn to_bytes(&self) -> (Vec<u8>, Vec<u8>)

Returns the byte representation of the ciphertext and keybase.

source

fn from_bytes(cipher: &[u8], keybase: &[u8]) -> Result<Self, FbError>
where Self: Sized,

Constructs the FbObj from the provided byte representations of ciphertext and keybase.

§Errors

Implementors§