You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While converting some existing code to the bcrypt API, I ran in to a (very) minor pain-point.
When working with some APIs it is natural for the password to be a char[] (e.g. passed to javax.crypto.spec.PBEKeySpec ctor) and the bcryptHash to be a byte[] (e.g. read fully from a java.io.DataInputStream).
This is probably an advanced use-case, but it would be nice to have Bcrypt.Verifyer.verify(char[] password, byte[] bcryptHash).
Activity
Provide new verify API with signature (char[] password, byte[] bcrypt…
patrickfav commentedon Apr 15, 2019
Is added. Downside is, that this can be a bit confusing as it expects the byte representation of a chars representing a base64 string.
Andrew-Cottrell commentedon Apr 24, 2019
I have run a quick test and the new method works exactly as I would expect.
Output (formatted):
It's perfect for my use-case. Thank you.