| Crates.io | cerpton |
| lib.rs | cerpton |
| version | 0.1.1 |
| created_at | 2024-04-01 19:50:53.697147+00 |
| updated_at | 2024-04-14 17:07:32.388425+00 |
| description | A 'double' Caesar Cypher. |
| homepage | |
| repository | https://github.com/NathanMcMillan54/cerpton/ |
| max_upload_size | |
| id | 1192915 |
| size | 17,841 |
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);