use crate::{
errors::CharNotInKeyError,
structs::{CryptModus, CryptResult},
};
#[deprecated(
since = "1.0.2",
note = "please use `Cipher` instead - I'm sorry for the typo..."
)]
pub use Cipher as Cypher;
pub(crate) trait Crypt {
fn crypt_payload(&self, payload: &str, modus: &CryptModus)
-> Result<String, CharNotInKeyError>;
fn crypt(&self, a: char, b: char, modus: &CryptModus)
-> Result<CryptResult, CharNotInKeyError>;
fn playload(&self, payload: &str) -> String;
}
pub trait Cipher {
fn encrypt(&self, payload: &str) -> Result<String, CharNotInKeyError>;
fn decrypt(&self, payload: &str) -> Result<String, CharNotInKeyError>;
}