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?

Starscream512
  • 73
  • 1
  • 6

1 Answers1

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.

jjanes
  • 42,332
  • 3
  • 44
  • 54