Crate scream_cypher

Source
Expand description

§scream_cypher

In the SCREAM CYPHER, messages consist of all As with different letters distinguished using diacritics. This is a tool that provides both a CLI tool and a library to encrypt and decrypt text using the scream cypher.

§Acknowledgements

This cypher originated from XKCD. Thank you, Randall Munroe, for always bringing such beautiful things into this world.

§Command line installation and usage

Install scream_cypher with Cargo:

cargo install scream_cypher

You can then use the scream command to encrypt and decrypt messages:

scream encrypt "This is a test."
# Āa̰ảã ảã a āáãā.

scream decrypt "Āa̰ảã ảã a āáãā."
# This is a test.

§Library installation and usage

Add scream_cypher to your project:

cargo add scream_cypher

You can then use scream_cypher::encrypt and scream_cypher::encrypt to encrypt and decrypt messages:

let ciphertext = scream_cypher::encrypt("This is a test.");

println!("Your message: \"{}\"", ciphertext);
// Your message: "Āa̰ảã ảã a āáãā."

let plaintext = scream_cypher::decrypt(cyphertext);

println!("Your message: \"{}\"", plaintext);
// Your message: "This is a test."

Constants§

CYPHER_MAP
A map of alpha characters to their corresponding scream cypher encoding.

Functions§

decrypt
Decrypts the given cyphertext using the scream cypher.
encrypt
Encrypts the given plaintext using the scream cypher.