A package for encrypting and decrypting files
Project description
pyCryptobox
pyCryptoBox is a Python package that allows you to encrypt and decrypt files and folders using the Fernet symmetric encryption algorithm.
Installation
Use the package manager pip to install foobar.
pip install pycryptobox
Usage
Encryption
To encrypt a single file, use the encrypt_file()
function:
from pycryptobox import encrypt_file
encrypt_file('/path/to/file')
To encrypt all files in a directory, use the encrypt_dir()
function
from pycryptobox import encrypt_files_in_directory
encrypt_files_in_directory('/path/to/directory')
Decryption
To decrypt a single file, use the decrypt_file() function:
from pycryptobox import decrypt_file
file_path = "/path/to/file.txt.locked"
decrypt_file(file_path)
To decrypt all files in a directory, use the decrypt_dir() function:
from pycryptobox import decrypt_files_in_directory
dir_path = "/path/to/directory"
decrypt_files_in_directory(dir_path)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
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 pycryptobox-1.0.6.tar.gz
.
File metadata
- Download URL: pycryptobox-1.0.6.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab2f49dacf80faf45e4018694f0443a2643f08d5c13ab8fcf10ad484105ba001 |
|
MD5 | a98f01a32d843662fdc6fede20007816 |
|
BLAKE2b-256 | 37b51b1ab26e3248aa6f4209a5a63418e6f1ab8dc66f3198b81e7697e6e95639 |