Struct cipher_crypt::autokey::Autokey [] [src]

pub struct Autokey { /* fields omitted */ }

An Autokey cipher.

This struct is created by the new() method. See its documentation for more.

Trait Implementations

impl Cipher for Autokey
[src]

[src]

Initialise an Autokey cipher given a specific key.

Will return Err if the key contains non-alphabetic symbols.

[src]

Encrypt a message using an Autokey cipher.

Examples

Basic usage:

use cipher_crypt::{Cipher, Autokey};

let a = Autokey::new(String::from("fort")).unwrap();
assert_eq!("Fhktcd 🗡 mhg otzx aade", a.encrypt("Attack 🗡 the east wall").unwrap());

[src]

Decrypt a message using an Autokey cipher.

Examples

Basic usage:

use cipher_crypt::{Cipher, Autokey};

let a = Autokey::new(String::from("fort")).unwrap();
assert_eq!("Attack 🗡 the east wall", a.decrypt("Fhktcd 🗡 mhg otzx aade").unwrap());

Auto Trait Implementations

impl Send for Autokey

impl Sync for Autokey