问题
I'm using jBCrypt (in Java) which cannot handle newer versions of BCrypt from PHP or Python. The exception is "Invalid salt revision" as it only supports "2a" version. Is there another updated Java library of BCrypt?
回答1:
There is an open issue on google code jbcrypt working group. They are introducing jBCrypt branch which supports '2y' hashes but it was never merged to official branch.
- https://code.google.com/archive/p/jbcrypt/issues/9
- https://github.com/Oscil8/jBCrypt/tree/djm-2y-etc
This branch is derived from jBCrypt-0.3 but meantime there were a newer version jBCrypt-0.4. I've prepared merged version based on '2y' branch with overflow fix from 0.4.
You can find the code here: https://github.com/anebril/jBCrypt/tree/gcsvn-merged-0.4-overflow-fix
来源:https://stackoverflow.com/questions/38597604/java-bcrypt-not-supporting-newer-versions-seeds-prefixed-with-2b-2y-etc