pub trait ObtextCodec {
// Required methods
fn enc(&self, plaintext: &str) -> Result<String, Error>;
fn dec(&self, obtext: &str) -> Result<String, Error>;
fn format(&self) -> Format;
fn scheme(&self) -> Scheme;
fn encoding(&self) -> Encoding;
}Expand description
Core trait for ObtextCodec encryption+encoding/decoding+decryption implementations.
Each scheme+encoding combination (AasvC32, AasvB64, etc.) implements this trait to provide a consistent interface for encoding and decoding operations.
Note: Construction methods (new, from_bytes, new_keyless) are not part of
this trait. Each type provides its own constructor with an appropriate signature.
Required Methods§
Sourcefn dec(&self, obtext: &str) -> Result<String, Error>
fn dec(&self, obtext: &str) -> Result<String, Error>
Decode an encoded string back to plaintext