Skip to content

This project is about Encryption & Decryption using Command Line in java.

Notifications You must be signed in to change notification settings

4hbane/Encrypt_Decrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Encrypt_Decrypt

This project is about Encryption & Decryption using Command Line in java.

To use this code, go to the Ecrypt_Decrypt Directory:

To Compile the Main :

 javac Main.java

You ll see in the Ecrypt_Decrypt Directory .class of all classes.

To run this code we can pass several arguments in the command line :

  • -alg : To choose the which algorithm; we've shift or unicode. if we didn't specifie by default it will use shift Algorirthm.
  • -mode: To choose the mode; enc or dec. If we didn't specifie by default it will use enc mode.
  • -data : To set the data to encrypt or decrypt.
  • -key : To set the key to encrypt or decrypt. If we didn't specifie by default it will use 0 as a key.
  • -in : To set the Input file to read data from which will be encrypt or decrypt. If we've both -in and -data we choose -data over -in.
  • -out : To set the Output file to write the result. If we don't have both -out we print the result to the standard output.

As you will see in the examples the order of the parameters is not important.

  • Exemples for running the Main :
java -cp . Main -alg unicode -mode enc -key 5  -in input.txt -out protected.txt 
java -cp . Main -mode ENC -data "Hello There!" -out protected.txt -key 5 
java -cp . Main -mode dec -in protected.txt -out decrypted.txt -key 5 -alg shift
java -cp . Main -mode ENC -data "Hello There!"  -key 5 -alg unicode

About

This project is about Encryption & Decryption using Command Line in java.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages