#xor #file-encryption #encryption-decryption #decryption #file #encryption #cli-file

app xrc_cli

A cli for multi-threaded encryption/decryption of files/folder using bitwise xor

7 stable releases

1.2.2 Mar 22, 2024
1.2.0 Dec 15, 2022
1.1.1 Dec 3, 2022
1.1.0 Nov 29, 2022
1.0.2 Nov 28, 2022

#130 in Cryptography

Download history 157/week @ 2024-03-16 68/week @ 2024-03-23 27/week @ 2024-03-30 125/week @ 2024-04-27

227 downloads per month

MIT license

2MB
698 lines

XORCryptor

crates.io

Encrypts or decrypts the file(s) using algorithm based on XOR bitwise operation.

About algorithm - Implementation lib

Older C++ version: CLI

CLI

This cli encrypts or decrypts the file(s) in synchronized multi-buffered multithreading way.

So the only bottleneck is your disk read/write speed.

Installing CLI

$ cargo install xrc_cli

Usage

Usage: xrc_cli [OPTIONS] <files>...

Arguments:
  <files>...  Files and folders to process

Options:
  -e, --encrypt  Encrypt
  -d, --decrypt  Decrypt
  -r             Recursively iterate folders if present
  -j <jobs>      No. of jobs
  -h, --help     Print help information
  -V, --version  Print version information
Click to expand for examples

It will ask for key everytime you encrypt or decrypt some file

Encrypt

$ xrc_cli -e  file.ext
Before command:         After command:

random_folder           random_folder
    |- some_fld             |- some_fld
    |   |- t.txt            |   |- t.txt
    |   |- p.txt            |   |- p.txt
    |   |- in_fld           |   |- in_fld
    |       |- v.mp4        |       |- v.mp4
    |- file.ext             |- file.ext.xrc

With Folder

$ xrc_cli -e  file.ext some_fld
Before command:         After command:

random_folder           random_folder
    |- some_fld             |- some_fld
    |   |- t.txt            |   |- t.txt.xrc
    |   |- p.txt            |   |- p.txt.xrc
    |   |- in_fld           |   |- in_fld
    |       |- v.mp4        |       |- v.mp4
    |- file.ext             |- file.ext.xrc

Preserve source

$ xrc_cli -p -e file.ext some_fld
Before command:         After command:

random_folder           random_folder
    |- some_fld             |- some_fld
        |- t.txt            |   |- t.txt
        |- p.txt            |   |- t.txt.xrc
        |- in_fld           |   |- p.txt
        |   |- v.mp4        |   |- p.txt.xrc
        |- file.ext         |   |- in_fld
                            |       |- v.mp4
                            |- file.ext
                            |- file.ext.xrc

Iterate Recursively

$ xrc_cli -r -e  file.ext some_fld
Before command:         After command:

random_folder           random_folder
    |- some_fld             |- some_fld
    |   |- t.txt            |   |- t.txt.xrc
    |   |- p.txt            |   |- p.txt.xrc
    |   |- in_fld           |   |- in_fld
    |       |- v.mp4        |       |- v.mp4.xrc
    |- file.ext             |- file.ext.xrc

NOTE !

DO NOT FORGET THE KEY YOU GAVE FOR ENCRYPTION

Dependencies

~4–12MB
~119K SLoC