simple file encryption using pycrypto
Project description
Easy file encryption using pycrypto
installing
pip install beefish pycrypto
Alternatively:
pip install -e git+git://github.com/coleifer/beefish.git#egg=beefish
Dependencies:
command-line options
Usage:
beefish.py [-tkedaq] in_file [out_file]
-e - encrypt the provided in_file and write to out_file
-d - decrypt the provided in_file and write to out_file
-k - specify password as command-line argument (if unspecified you will be securely prompted).
-a - use AES-256 instead of the default “Blowfish” cipher.
-t - run test suite
-q - quiet mode (controls verbosity of test output).
examples
beefish can be used to encrypt and decrypt file-like objects:
from beefish import encrypt, decrypt # encrypting with open('secrets.txt') as fh: with open('secrets.enc', 'wb') as out_fh: encrypt(fh, out_fh, 'secret p@ssword') # decrypting with open('secrets.enc') as fh: with open('secrets.dec', 'wb') as out_fh: decrypt(fh, out_fh, 'secret p@ssword')
you can use a shortcut if you like:
# encrypting encrypt_file('secrets.txt', 'secrets.enc', 'p@ssword') # decrypting decrypt_file('secrets.enc', 'secrets.dec', 'p@ssword')
you can use it from the command-line:
beefish.py -e secrets.txt secrets.enc beefish.py -d secrets.enc secrets.dec
to use AES-256 cipher instead of the default, which is blowfish:
beefish.py -a -e secrets.txt beefish.py -a -d secrets.encrypted
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file beefish-0.2.0.tar.gz
.
File metadata
- Download URL: beefish-0.2.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07dcf1b6d549f8086b09150b34180ad97a6ab481fc854bebb9dfc826bc82d6d1 |
|
MD5 | bacf6de8ebbe2d0c6a0e57504ca7649c |
|
BLAKE2b-256 | e2a3706d6ac59b9b36bb4951a0e4018b083b78dbd8aca4352ccbc47fb12c1980 |