Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
pyCryptoBox is a Python package that allows you to encrypt and decrypt files and folders using the Fernet symmetric encryption algorithm.
Use the package manager pip to install foobar.
pip install pycryptobox
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')
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)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
FAQs
A package for encrypting and decrypting files
We found that pycryptobox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.