Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to create an encrypted file using vim editor  (Read 1824 times)

0 Members and 1 Guest are viewing this topic.

jominj

  • Guest
How to create an encrypted file using vim editor
« on: January 25, 2014, 05:57:49 am »
Hi Guys,

We can create encrypted files using the vim editor. Lets have a look how to do this.

1. use the switch 'x' with vim editor to create encrypted file.
Code: [Select]
#vim -x file.txt
2. The file called 'file.txt' will open up and there will be a prompt saying "Enter encryption key:" there we have to enter the encryption key

3. Confirm the encryption key again and press 'i' to input to the file. then save the file using 'wq'

4. Try to view the file content using cat command we will get some encrypted data.
Code: [Select]
#cat file.txt
VimCrypt~01!dJH!�W�γ4l�fF&�

5. Open the file with vim editor again and provide the encryption key, then only we can see the original data.


Thank you.  :)