4 ms·
Create a new document in vim, save with the :X command and enter an encryption key. If you open the file afterwards it will ask for the key. I've been using th
by jsprodc 13y ago
Create a new document in vim, save with the :X command and enter an encryption key. If you open the file afterwards it will ask for the key.
I've been using this for years, works like a charm.
- icebraining 13y agoBeware: the default encryption method is very weak and can be brute-forced by anyone who knows a few characters of the original file. Since v7.3, Vim supports Blowfish, which is much stronger. http://vim.wikia.com/wiki/Encryption http://vim.wikia.com/wiki/Encryption
- vesinisa 13y ago> Since v7.3, Vim supports Blowfish, which is much stronger. No. Even the designer of Blowfish thinks you should not use it anymore: https://www.schneier.com/news-048.html https://www.schneier.com/news-048.html
- icebraining 13y agoThat doesn't contradict what I wrote, though. As far as I know, Blowfish hasn't been broken, and while it's theoretically less secure than its successors, it's still a valid choice if you want to use Vim's built-in encryption, which only supports pkzip and blowfish.