vimdecrypt
Command line tool for decrypting vim-blowfish-encrypted files.
As of version 7.3 vim offers built in blowfish encryption/decryption. Unfortunately the resulting files can only be read back by vim, precluding batch processing or scripting. Also longevity of encrypted data is a concern if a program with the dependencies and size of vim is required to unlock it.
This project provides a very simpe vimdecrypt Python module for decrypting
blowfish-encoded file objects, as well as the vimdecrypt command line tool
for decrypting files to stdout.
encryption methods
Vimdecrypt supports only blowfish2 encryption. Files encrypted using either zip
or blowfish should be converted using :set cm=blowfish2 prior to using this
tool.
requirements
Besides Python 3, vimdecrypt requires any one of PyCryto, PyCryptoDome or blowfish to be installed.
installation
Both the Python module and the command line tool are installable via Pip:
$ pip install [--user]
This will install the blowfish module by default
usage
With ~/.local/bin in your executable path, decrypt any file to stdout using:
$ vimdecrypt [path]
If the path argument is omitted then data is read from stdin:
$ cat somefile | vimdecrypt
Note that the password is obtained via GNU getpass which does not interfere with stdin/stdout redirection.
The Python module defines only the decrypt method:
>>> import vimdecrypt
>>> with open('somefile', 'rb') as f:
>>> text = vimdecrypt.decrypt(f)
credits
Thanks to @nlitsme for demonstrating blowfish decryption in Python. His identically named vimdecrypt project supports multiple encryption methods as well as password cracking.
Release files for vimdecrypt 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vimdecrypt-2.1.0.tar.gz | 9.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vimdecrypt-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.9 kB
Release files / vimdecrypt-2.1.0.tar.gz
| Download URL | vimdecrypt-2.1.0.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9420813515710996184ce2d7b17b7d68c1974271ac3aa9e91b9bf6ceb84b4f8
|
|
BLAKE2b-256 checksum How to use checksums |
941b350e11f78e60fb9d194cc75a6477bb726187845f467f261b8a0cd607cc33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.15
|
Release files / vimdecrypt-2.1.0-py3-none-any.whl
| Download URL | vimdecrypt-2.1.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7396c43bbf9dba1dd3a0c2d5310b4e185a6a3eebb56f2544fd3bb951a5496ef
|
|
BLAKE2b-256 checksum How to use checksums |
bba485bbeba8e539442b74323c73c10ead38612aedd158375ffcfbceb6ceee7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.15
|