Avoid such a warnings from coverity:
CID
1645121: (#1 of 1): Calling risky function (DC.WEAK_CRYPTO)
dont_call: random should not be used for security-related applications,
because linear congruential algorithms are too easy to break.
Reported in GH #3283 and #3285
} while (*next);
if (use_rand)
- result = ((long long)random() * result) / ((long long)RAND_MAX + 1);
+ result = ((long long)ha_random64() * result) / ((long long)RAND_MAX + 1);
switch (*arg) {
case 's':
}
for (i = 0; i < random_resp_len; i++)
- random_resp[i] = rand() >> 16;
+ random_resp[i] = ha_random32() >> 16;
return 1;
}