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)
Metadata
Release files for fernet-toolkit 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fernet_toolkit-1.0.1.tar.gz | 14.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fernet_toolkit-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.6 kB
Release files / fernet_toolkit-1.0.1.tar.gz
| Download URL | fernet_toolkit-1.0.1.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2f13ccb69ffbc1f7b65cafb55b66a6a993991081cbc266acc096d457c29c987
|
|
BLAKE2b-256 checksum How to use checksums |
827278c2c701035960be189f31d680cefd06d949ab4dcf28736d934766cba76e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / fernet_toolkit-1.0.1-py3-none-any.whl
| Download URL | fernet_toolkit-1.0.1-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
474860de2d427a375c0390d80de67c691d41aa60b9c589fd2e54bab8810b5155
|
|
BLAKE2b-256 checksum How to use checksums |
6be5c1f528e21de521abbd196db8dc45a33e149d4107c8d7a22b2d4017f75aa4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|