Lines Matching defs:rounds
7 * in the salt and rounds= setting must contain a valid iteration count,
169 * rounds limit has been lowered (versus the reference/spec), also for DoS
170 * protection. runtime is O(klen^2 + klen*rounds) */
192 char rounds[20] = "";
201 /* setting: $5$rounds=n$salt$ (rounds=n$ and closing $ are optional) */
207 if (strncmp(salt, "rounds=", sizeof "rounds=" - 1) == 0) {
213 * bad rounds setting is rejected if it is
218 * rounds as part of the salt or parse them with
223 salt += sizeof "rounds=" - 1;
236 /* needed when rounds is zero prefixed or out of bounds */
237 sprintf(rounds, "rounds=%u$", r);
277 /* iterate A = f(A,DP,DS), this step takes O(rounds*klen) time */
295 /* output is $5$rounds=n$salt$hash */
297 p += sprintf(p, "$5$%s%.*s$", rounds, slen, salt);
311 static const char testsetting[] = "$5$rounds=1234$abc0123456789$";
312 static const char testhash[] = "$5$rounds=1234$abc0123456789$3VfDjPt05VHFn47C/ojFZ6KRPYrOjj1lLbH.dkF3bZ6";