However, when I try to (hashers/check "secret" (:password ..)) on any of the records, I get false back. This happens if I manually copy the password text into the check as well. Note that this only happens when I re-run the application. If I create a record, and check the hash in the same REPL session, then the check passes. I thought this may be due to the salt (I'm not specifying it, and therefore it's using the default (random-bytes 12)), but that's stored in the hash string, so that shouldn't be an issue.
Details:
(1) algorithm: bcrypt+sha512 (I'm using defaults for both derive and check)
(2) SQL type: varchar(98)
Have you encountered this in the past, or do you have an idea of what error I may be making on my end?
Hello!
I've defined some user records:
And created records for them in the DB:
However, when I try to
(hashers/check "secret" (:password ..))
on any of the records, I get false back. This happens if I manually copy the password text into the check as well. Note that this only happens when I re-run the application. If I create a record, and check the hash in the same REPL session, then the check passes. I thought this may be due to the salt (I'm not specifying it, and therefore it's using the default(random-bytes 12)
), but that's stored in the hash string, so that shouldn't be an issue.Details: (1) algorithm:
bcrypt+sha512
(I'm using defaults for bothderive
andcheck
) (2) SQL type:varchar(98)
Have you encountered this in the past, or do you have an idea of what error I may be making on my end?