rugenere

Crates.iorugenere
lib.rsrugenere
version0.2.1
sourcesrc
created_at2019-08-07 18:50:29.440521
updated_at2019-08-07 18:57:51.306147
descriptionVigenère cipher tool written in rust that can encode, decode and store and read from files.
homepagehttps://github.com/bruno-anjos/rugenere
repositoryhttps://github.com/bruno-anjos/rugenere
max_upload_size
id154852
size2,693,903
Bruno Anjos (bruno-anjos)

documentation

https://docs.rs/rugenere

README

rugenere GitHub license version dependencies

rugenere is a simple vigenère cipher tool written in rust. It can encode and decode text either from the standard input or a file. It can also write the output to a file.

Branches Build Status
master Build Status
dev Build Status

Installing

To install this tool just clone the git repository by running the following command (have in mind that this will clone the repository to your current directory).

> git clone https://github.com/bruno-anjos/rugenere.git
> cd rugenere
> cargo build --release

Examples

I made it easier to run this tool by creating a link to the binary in the target directory.

help

Run rugenere with the --help to get helpful information

> ./rugenere --help
rugenere 1.0
Bruno Anjos <bruno.vale.anjos@gmail.com>
Vigenére cipher encoder and decoder.

USAGE:
    rugenere [OPTIONS] <key> --mode <mode>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -i, --input <input>      file name to read content from
    -m, --mode <mode>        sets mode to encode or decode [possible values: encode, decode]
    -o, --output <output>    file name to write content to

ARGS:
    <key>    key used to encode or decode the content

encode

Run rugenere with the m flag set to encode

> ./rugenere TESTKEY -m encode
THis Is AN exaMPlE
Result: MLal Sw YG iptWTjX

decode

Run rugenere with the m flag set to decode

> ./rugenere TESTKEY -m decode
MLal Sw YG iptWTjX
Result: THis Is AN exaMPlE

with input file

Run rugenere with the i flag followed by the file name

> ./rugenere TESTKEY -m encode -i input_test
Result: MlAL sw hNWl tX IvTQheo

with output file

Run rugenere with the o flag followed by the file name

> ./rugenere TESTKEY -m encode -i input_test -o output_test
> cat output_test
MlAL sw hNWl tX IvTQheo

Built with

  • clap - rust library to parse CLI arguments

Contributing

If you detect any bug or find any way to improve the code, please make a pull request or submit an issue.

License

This project is licensed under the GNU License - see the LICENSE.md file for details

Commit count: 43

cargo fmt