Skip to main content

Generate and check werkzeug.security password hashes on the command line

Project description

WerkzeugSecurityCLI

A CLI wrapper around

  • werkzeug.security.generate_password_hash
  • werkzeug.security.check_password_hash

for generating and checking werkzeug.security password hashes on the command line

Disclaimer!

Not associated with Werkzeug in any way! (other than using their wonderful software :D)

Examples

$ HASH=$(wzcli generate my-test-password-123)
$ echo "${HASH}"
scrypt:32768:8:1$pyMfKdIqwYxw0GOT$6d49052bdf9cffb2288d7cb198d7bed5566f284932dad0c74b3948866b1468220afd93e9aa17069c4a2403d33747e5e71981c3c552d751a0e249642b6641bac5
$ wzcli check "${HASH}" my-test-password-12
False
$ wzcli check "${HASH}" my-test-password-123
True

One can supply the password positional argument directly in the command line argv as above, or supply - to read the password from stdin using Python's getpass module as below

$ HASH=$(wzcli generate -)
> Password: # sneedy-feedy
$ wzcli check "${HASH}" -
> Password: # sneedy-feedy
True

Installing

Available on PyPI as WerkzeugSecurityCLI.

I like to use pipx to manage Python CLI utils:

$ pipx install WerkzeugSecurityCLI

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

werkzeugsecuritycli-1.0.0.tar.gz (39.5 kB view details)

Uploaded Source

Built Distribution

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

WerkzeugSecurityCLI-1.0.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: werkzeugsecuritycli-1.0.0.tar.gz
  • Upload date:
  • Size: 39.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.7

File hashes

Hashes for werkzeugsecuritycli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 49ebcc9af6f21cb6114389ef6cb7eeba19d6ed39ec1377d1c761ca7f21c14cd1
MD5 5971d39b8ba8f6f07fb80e9c172a24e7
BLAKE2b-256 af959952f6583c0a61b58c99f7c3b7bc6309354e640637f37dc3b2a264ae5e8f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for WerkzeugSecurityCLI-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7701583658f9c3101a1a21955e8a54e7c1fedab39bb1d7287035751393720535
MD5 3736021c4325e4334d30f64bf78aee5d
BLAKE2b-256 99c70e556f675abdb53aecd16987ae228fa8cbf17a8732f3c801039bd0712ae3

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