Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does hash CLI tool generates different output for the same input? #27

Open
jeremiak opened this issue Oct 2, 2023 · 0 comments
Open

Comments

@jeremiak
Copy link

jeremiak commented Oct 2, 2023

I'm having trouble setting up HTTP basic auth for an instance and I noticed that the hash-password command doesn't seem to generate the same hash when the same input is supplied. Should it?

For example, running the command on my machine (Macbook Pro, Intel i7, MacOS 13.5.2, Python 3.9.4) with the input "october" returns a different result for each invocation as, as you can see below. I would think that password hashing should be consistent so the app can reliably hash the supplied password and check the results.

echo 'october' | datasette hash-password --no-confirm
pbkdf2_sha256$480000$c5ad381bd75b1a3d222c0b5b6e05dee1$o2Y7BF/U9NeD7fZrE0lmCnfDWd29W/x7uFyqF1d/0mk=

echo 'october' | datasette hash-password --no-confirm
pbkdf2_sha256$480000$ef0c60e7c872e135a11b1d464f0a4812$7BNmej6olJhMjOIsvqAMKFleF92Qjzs9gaGqeWI3Ve0=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant