Cipher

Trait Cipher 

Source
pub trait Cipher {
    // Required methods
    fn encrypt(&self, plaintext: &str) -> String;
    fn decrypt(&self, ciphertext: &str) -> String;
}
Expand description

Cipher trait, enforces encrypt and decrypt methods.

Required Methods§

Source

fn encrypt(&self, plaintext: &str) -> String

Encryption logic for a given plaintext

Source

fn decrypt(&self, ciphertext: &str) -> String

Decryption logic for a given ciphertext

Implementors§