What is the maximum character limit that this bcrypt library can handle?
penguinawesome opened this issue · 5 comments
What is the maximum character limit that this bcrypt library can handle? I saw on others that it can handle up to 72 characters, or 55 characters, I am not sure with this library. I would like to know what is the maximum characters.
In the case of the library 72
https://github.com/BcryptNet/bcrypt.net/blob/main/src/BCrypt.Net.UnitTests/BCryptTests.cs#L105-L112
But you can retain entropy above this with the 'enhanced hashing' functionality.
@ChrisMcKee if we're gonna use the enhanced hashing, what would be the new max characters limit?
Heat death of the universe or the maximum achievable entropy of SHA384 whichever comes first
The enhanced hashing basically pre-hashes the key in order to avoid loss of entropy over the 72 character limit.
Its a common implementation (rather than one pulled out of my ... head) 😄
Thanks @ChrisMcKee :D this library is awesome! We will try to use this.