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=$(wzscli generate my-test-password-123)
$ echo "${HASH}"
scrypt:32768:8:1$pyMfKdIqwYxw0GOT$6d49052bdf9cffb2288d7cb198d7bed5566f284932dad0c74b3948866b1468220afd93e9aa17069c4a2403d33747e5e71981c3c552d751a0e249642b6641bac5
$ wzscli check "${HASH}" my-test-password-12
False
$ wzscli 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=$(wzscli generate -)
> Password: # sneedy-feedy
$ wzscli 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.1.0.tar.gz (39.6 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.1.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for werkzeugsecuritycli-1.1.0.tar.gz
Algorithm Hash digest
SHA256 63fba485cbb4c90671873cea125ec2057fdfe6a3b4d764e952b9d4b86104d7e1
MD5 fa9e509d3f1beda1e00bcd2a4a234391
BLAKE2b-256 749c2d37c5219571c7937b02112a9a0d7618d2f130343a5cc16fb94b27cfa06a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for WerkzeugSecurityCLI-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19cdb40588f2a45dfe783741a488054cc1bf48a93ae291c195a723f93b986d6a
MD5 d57892a68ba130f5ae85659c77ae2dd5
BLAKE2b-256 c6aadb8eac02a4af36257a8b55eab8036b778fdfbbf14725742854b045d1c83c

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