Giter VIP home page Giter VIP logo

beefish's Introduction

beefish

Easy file encryption using pycrypto

http://media.charlesleifer.com/blog/photos/beefish.jpg

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

beefish's People

Contributors

coleifer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.