Encrypt file using fernet
Project description
Encrypter
This package contains 2 main functions for Encrypting and Decrypting a file. encrypt_file() creates an encrypted copy of a file using Fernet (symmetric encryption) in the working directory. The function takes a file as main argument and a key_file as optional argument. If no key_file is given, then a key for the encryption is created using Fernet.generate_key()
decrypt_file() is used for decrypting the file generated by the previous function. It requires the encrypted file and the key generated (or used) during the encryption process.
Installation
To install run the following:
pip install encrypter-fernet-dr
Usage
from encrypter_fernet_dr import encrypt_file
# generate key and encrypted copy of my_file in the working directory
encrypt_file('my_file')
from encrypter_fernet_dr import decrypt_file
# decrypt the file passing the key generated or used before
decrypt_file('my_file_encrypted', 'my_key')
Developing Encrypter
To install encrypter, along with the tools needed to develop and run tests, run the following in your virtualenv:
$ pip install -e .[dev]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for encrypter_fernet_dr-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f03ba881953ccff9070fd89cadc8a6d54068b8e141122cf93a08714d6520e358 |
|
MD5 | e4f1c0458f33476194d4e3619e5dc8f5 |
|
BLAKE2b-256 | f926b37f0a1a8eed6be23cc021871b044cd1dedf539a858ecc97ea0be7a5d392 |
Hashes for encrypter_fernet_dr-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6479b8eea3040dd9a82810668e5a59a1510aaa0427073bda82cb82c10cd0fea |
|
MD5 | 14a2bceae661285361d8830d2d33d036 |
|
BLAKE2b-256 | 6751f0e520cc70c49ee9aa8da3f71786380d5c2909b7ebc16521aebbef80a411 |