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§
sourcefn as_bytes(&self) -> (Vec<u8>, Vec<u8>)
fn as_bytes(&self) -> (Vec<u8>, Vec<u8>)
Returns the byte representation of the ciphertext and keybase.
sourcefn as_base64(&self) -> (String, String)
fn as_base64(&self) -> (String, String)
Returns the base64 encoded representation of the ciphertext and keybase.
sourcefn from_bytes(cipher: &[u8], keybase: &[u8]) -> Result<FBObj<T>, FBError>
fn from_bytes(cipher: &[u8], keybase: &[u8]) -> Result<FBObj<T>, FBError>
Constructs the FBObj
from the provided byte representations of
ciphertext and keybase.
§Errors
- InvalidParams - Are the parameters in the wrong order?
sourcefn from_base64(cipher: &str, keybase: &str) -> Result<FBObj<T>, FBError>
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
- DecodeError
- InvalidParams - Are the parameters in the wrong order?
Object Safety§
This trait is not object safe.