I\'ve been given the task of creating a Login API for our project and I\'m supposed to use PBKDF2 with HMACSHA256 as the PRF. The plain text password is hashed using MD5 an
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 )