cerpton

Crates.iocerpton
lib.rscerpton
version0.1.1
sourcesrc
created_at2024-04-01 19:50:53.697147
updated_at2024-04-14 17:07:32.388425
descriptionA 'double' Caesar Cypher.
homepage
repositoryhttps://github.com/NathanMcMillan54/cerpton/
max_upload_size
id1192915
size17,841
(NathanMcMillan54)

documentation

https://docs.rs/

README

Cerpton

A "double" Caesar cipher that contains a mix of different alphabets. Cerpton takes two values and shifts the "alphabet" starting from two different positions (a long with a few extra things).

Example:

use cerpton::{Encoder, libcerpton_encode};

let mut encoder = Encoder::new(2, 1);

// Creates a new ``Alphabet``
encoder.set_alphabet();

// Check if the input setting is ok
if !encoder.setting_good() {
    panic!("Invalid setting");
}

let regular_text = String::from("This is some text!!!");
let encoded_text = encoder.encode(regular_text);

println!("{} -> {}", regular_text, encoded_text);
// "This is some text!!!" -> "Sg$غ $غ غ[ШJ KJwKللل"

// Or using a single function:
let encoded_text = libcerpton_encode([2, 1, 0, 0, 0, 0], regular_text);
Commit count: 15

cargo fmt