Skip to main content

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

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


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.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fernet_toolkit-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file fernet_toolkit-1.0.0.tar.gz.

File metadata

  • Download URL: fernet_toolkit-1.0.0.tar.gz
  • Upload date:
  • Size: 13.4 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

Hashes for fernet_toolkit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b5c927d6d8d979004ff1547bcfa7d02768da5533db2aa7d04b69fd4fbc8fc3a3
MD5 f91379e8dd8305cdcd4988c933616738
BLAKE2b-256 ba1160fd3eb95ad15df5a2926d582dd86e42bbb65df38e471749e3c451a21a85

See more details on using hashes here.

File details

Details for the file fernet_toolkit-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: fernet_toolkit-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.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

Hashes for fernet_toolkit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a02a62f35cf79d06219e5548b9991cd6bc846bbc665f3b2c8ba66d63a6b5b2ba
MD5 8966f23261a0a2a55ffd4f1feb295445
BLAKE2b-256 aed9d4c70a2f07cdd5fcc6cadff2e97bc8e38f782200c15f6a497b6ec6005e92

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page