caesar_cipher_enc_dec

Crates.iocaesar_cipher_enc_dec
lib.rscaesar_cipher_enc_dec
version0.6.2
sourcesrc
created_at2023-09-05 13:20:06.853775
updated_at2024-03-27 15:15:24.606789
descriptioncan easily use caesar cipher
homepage
repository
max_upload_size
id964275
size3,870
Teppei.F (T3pp31)

documentation

README

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);

link

https://crates.io/crates/caesar_cipher_enc_dec

Commit count: 0

cargo fmt