blob: cac1b861c4840e4beca4b3689a1baa1a4f97f2aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# encrypt.nvim
This is a simple alternative to the "X" command that was removed from Neovim.
Disclaimer: It's probably not the most secure implementation (if such thing is
even possible) but it gives the ability to edit files while they are stored
in an encrypted format on the disk.
## Usage
Encryption:
1. Open a file
2. Run `:X`
3. Enter a password
Now the file is encrypted and every time you open it you'll be asked for the
password.
Decryption:
1. Open an encrypted file
2. Run `:X`
3. Enter a password
Now the encrypted file is decrypted in the buffer.
## Installation
Add the following to your package manager:
```lua
{ "elentok/encrypt.nvim", opts = {} },
```
## Manual decryption
To decrypt a file that was encrypted using `decrypt.nvim` without the plugin
just run:
```
tail -n +2 encrypted.txt \
| base64 --decode \
| openssl enc -d -aes-256-cbc -pbkdf2 -salt -in - -out - -k {PASSWORD}
```
Or use the provided [decrypt.sh](decrypt.sh)
|