A CLI tool to encrypt/decrypt using keys/passwords based on Fernet.
Project description
Fernet Toolkit
A CLI tool to encrypt/decrypt using keys/passwords based on Fernet.
Features
- Encrypt/Decrypt a single file or a directory.
- Use a key or a password (Argon2/PBKDF2).
- Only encrypt files of specified type.
- Doesn't require configuration. The work factor for key derivation is calculated from current year using Moore's Law.
Installation
Using pip
pip install fernet-toolkit
From Source
git clone https://github.com/60x20/Fernet-Toolkit.git
cd Fernet-Toolkit
uv tool install .
Usage
Use key
f-encrypt -r "./input" -o "./"
f-decrypt -r "./encrypted" -o "./" -k "./key.key"
Use password
f-encrypt -r "./input" -o "./" --use-password
f-decrypt -r "./encrypted" -o "./" --use-password
Options
Encrypt Options
| Short | Long | Default | Description |
|---|---|---|---|
-h |
--help |
show this help message and exit | |
-o |
--outdir |
None |
output directory |
--file-type |
text |
Only encrypt files of specified type. | |
-v |
--verbose |
Print more information. | |
-r |
--rootdir |
None |
input directory |
-f |
--file |
None |
input file |
-k |
--path-to-key |
None |
Encrypt using a key stored at the given path. |
--use-password |
Encrypt using a KDF. | ||
--KDF |
Argon2 |
which KDF to use |
Decrypt Options
| Short | Long | Default | Description |
|---|---|---|---|
-h |
--help |
show this help message and exit | |
-r |
--rootdir |
None |
input directory |
-o |
--outdir |
None |
output directory |
-v |
--verbose |
Print more information. | |
-k |
--path-to-key |
None |
Decrypt using a key stored at the given path. |
--use-password |
Decrypt using a KDF. |
Known Bugs
- Outputting into input directory could cause the ciphertext to be re-encrypted. (especially with
--file-type any)
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
fernet_toolkit-1.0.1.tar.gz
(14.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fernet_toolkit-1.0.1.tar.gz.
File metadata
- Download URL: fernet_toolkit-1.0.1.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2f13ccb69ffbc1f7b65cafb55b66a6a993991081cbc266acc096d457c29c987
|
|
| MD5 |
3ef2cbad765987c7c40dd16aeb774bfc
|
|
| BLAKE2b-256 |
827278c2c701035960be189f31d680cefd06d949ab4dcf28736d934766cba76e
|
File details
Details for the file fernet_toolkit-1.0.1-py3-none-any.whl.
File metadata
- Download URL: fernet_toolkit-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
474860de2d427a375c0390d80de67c691d41aa60b9c589fd2e54bab8810b5155
|
|
| MD5 |
87fed05b87c6068eaedef94948c01c42
|
|
| BLAKE2b-256 |
6be5c1f528e21de521abbd196db8dc45a33e149d4107c8d7a22b2d4017f75aa4
|