Java - PBKDF2 with HMACSHA256 as the PRF

我与影子孤独终老i 提交于 2019-11-28 19:42:01

The iterations count was supposed to 4096, not 1000.

The generation of int l seems wrong. You have specified the maximum between dkLen and hLen but the spec says l = CEIL (dkLen / hLen) with

CEIL (x) is the "ceiling" function, i.e. the smallest integer greater than, or equal to, x.

I think l would be more accurately defined as l = (int)Math.ceil( (double)dkLen / (double)hLen )

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