Trait false_bottom::Encode

source ·
pub trait Encode<T>
where Self: FBObjTrait<T>, T: ArrayEncoding + Bounded,
{ // Provided methods fn as_bytes(&self) -> (Vec<u8>, Vec<u8>) { ... } fn as_base64(&self) -> (String, String) { ... } fn from_bytes(cipher: &[u8], keybase: &[u8]) -> Result<FBObj<T>, FBError> { ... } fn from_base64(cipher: &str, keybase: &str) -> Result<FBObj<T>, FBError> { ... } }

Provided Methods§

source

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

Returns the byte representation of the ciphertext and keybase.

source

fn as_base64(&self) -> (String, String)

Returns the base64 encoded representation of the ciphertext and keybase.

source

fn from_bytes(cipher: &[u8], keybase: &[u8]) -> Result<FBObj<T>, FBError>

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

§Errors
source

fn from_base64(cipher: &str, keybase: &str) -> Result<FBObj<T>, FBError>

Constructs the FBObj from the provided base64 encoded forms of ciphertext and keybase.

§Errors

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Encode<T> for FBObj<T>