12 releases (5 breaking)
0.6.2 | Mar 27, 2024 |
---|---|
0.6.1 | Mar 27, 2024 |
0.5.3 | Mar 27, 2024 |
0.4.0 | Feb 19, 2024 |
0.1.0 | Sep 5, 2023 |
#530 in Cryptography
4KB
caesar_encrypt
can easily use caesar_encrypt and decrypt. set text and shift number
usage
use caesar_cipher_enc_dec::caesar_cipher::caesar_encrypt;
fn main(){
let text = "I LOVE YOU";
let enc_text = encrypt(&text, 3);
let dec_text = encrypt(&enc_text, -3);
let dec_text2 = decrypt(&enc_text, 3);
}
Example
you can use this encrypt code for decrypt.
use crate::caesar_cipher_enc_dec::caesar_cipher::caesar_encrypt;
let text = "L ORYH BRX.";
for i in 0..26{
let mut result = encrypt(&text, i)}
println!("{}", result);