Java BCrypt not supporting newer versions (seeds prefixed with 2b, 2y, etc)

纵然是瞬间 提交于 2019-12-06 06:17:14

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!