It is a console app I did as a course project in KPI University
You can create, save and use various ciphers made by yourself using this program. You can also use it for educational purposes with pre-made morse and caesar ciphers, which are both used in school IT lessons.
No libraries were used in this project except for those that are integrated in to Node.js (fs, for example).
First up, clone the repository via this command:
git clone https://github.com/M-Rybalko/FilesEncryptor.git
Then run these two commands in your terminal:
Opening the source folder:
cd src
Running the program:
node commands.js
First thing you need to know is that all commands are divided by levels: general level and custom level. There is a help command on each level. You start on general level. Custom level is entered automatically after using create
or import
commands. Exiting custom level is made by exit
command.
To get acquainted with commands you might use help
command, just as told in program.
If you only start using files encryptor, you might want to start creating your own cipher. create
command is made for this:
As it was told before, both levels have their own help
commands. Let's add our first replacer into our cipher. Usingadd
command, you can replace various character sequences with others.
Now all "Hello" words will be replaced with "Goodbye"
If i don't want certain parts to appear in encrypted file, I can use omit
command.
You can stack both replacers and omissions endlessly
If you made a mistake while creating your cipher, you can use delete
command to correct it.
delete
has different switches each responsible for deleting either a part of the cipher, or the cipher itself
if you want to see how your cipher looks like at some point of time, use show
command.
You might want to save your cipher into JSON format to not lose the progress in future. save
command is designed to do so. Also, you will always be remembered to save your cipher upon using exit
command.
save
command creates a new folderCustom ciphers
with a folder inside called by the name of your cipher. In it you can find both components of your cipher in JSON format.
Now we can try encrypting some files! If you don't exit the program, the last cipher you worked on will be saved in memory, so you don't need to use import
every time. In Files Encryptor
folder you can see the Texts
folder. Files to encrypt are stored there. Let's encrypt the "Hello world! [[[[" text.
The files are saved in
Encrypted
folder by set name. But you can change it to any name you want manually after encrypting.
After all things are done, you can leave the program by using exit
command.
I made some tests for the program. To use them, write this command:
node tests/tests.js
It expects to return all green success messages.