In: Computer Science
Hi,
(C programming)
I am looking to write a program that will encrypt a text file automatically once program has opened, and have the option to decrypt it in a menu in my program.
I have multiple text files that I need to encrypt, and would like if the program could encrypt all of them at once.
I would also only like to decrypt the a text file once the name has been entered into a scanf function.
Encrypt/Decrypt Files in Linux using Ccrypt
Ccrypt is a command line tool for encryption and decryption of data. Ccrypt is based on the Rijndael cipher, the same cipher used in the AES standard. On the other hand, in the AES standard, a 128-bit block size is used, whereas ccrypt uses a 256-bit block size. Ccrypt commonly uses the .cpt file extension for encrypted files.
Installation
sudo apt-get install ccrypt // in ubuntu
Ccript
Encrypting files with Ccrypt
In order to encrypt file using this tool, use following syntax:
ccrypt filename
To encrypt a file : impfile
ccrypt impfile
Decrypt file with Ccrypt
Now in order to decrypt an already encrypted file, command syntax is:
ccrypt –d encryptedfilename