0

In PostgreSQL, using the pgcrypto module, I can generate a slow hash with blowfish (or any supported algorithm) like this:

crypt('SomeTextHere', gen_salt('bf'));

However, it auto-generates a salt (with gen_salt) and requires it. I don't want to use any salt. I am also not interested in using a normal hashing function (like sha256). How can I generate a slow hash without a salt?

1 Answer 1

1

It is trivial to use the same salt every time. Just do it:

 select crypt('SomeTextHere','$2a$16$aaaaaaaaaaaaaaaaaaaaaa');

If you don't want any salt at all, you would need to go write some code to implement that. That is certainly not a DBA task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.