Argon2 password hashing empty string

Username (e.g. epiz_XXX) or Website URL

https://pratanumandal.in/

Error Message

N/A

Other Information

Empty string is returned on password_hash() with PASSWORD_ARGON2ID and PASSWORD_ARGON2I in PHP.

$hash = password_hash($password, PASSWORD_ARGON2ID)

$hash is assigned empty string.
I have already cross checked to make sure I am using PHP 7.4.

Looking at the official PHP docs:

  • PASSWORD_ARGON2I - Use the Argon2i hashing algorithm to create the hash. This algorithm is only available if PHP has been compiled with Argon2 support.
  • PASSWORD_ARGON2ID - Use the Argon2id hashing algorithm to create the hash. This algorithm is only available if PHP has been compiled with Argon2 support.

It’s possible that our PHP installation has not been compiled with Argon2 support, so this doesn’t work.

How important is Argon2 for your site? Is it custom coded or off the shelf software? Could you switch it to regular PASSWORD_DEFAULT instead?

1 Like

I can confirm from the error log that the PHP installation has not been compiled with Argon2 support. Argon2 is important for my site to maintain compatibility with a specific data format.

This forum post states the inclusion of support for Argon2 in InfinityFree: https://forum.infinityfree.com/t/php-7-3-is-now-available/17393

Could it be a misconfiguration with this particular account? Is it possible to get support for Argon2?

No, that’s not likely. I don’t think our server setup even makes it possible to have different configuration per account.

It’s more likely that I wrote that announcement based on the release notes of PHP themselves and didn’t consider that our builds might not have all of those things.

I can ask and see if Argon2 can be added. But given that you’re the first to ask for it, consider that the answer may be “no, just use bcrypt or upgrade”.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.