Fix rand generator
This commit is contained in:
@@ -116,7 +116,7 @@ QString randomPassword() {
|
|||||||
char* s = new char[passwordLength + 1];
|
char* s = new char[passwordLength + 1];
|
||||||
|
|
||||||
for (int i = 0; i < passwordLength; ++i) {
|
for (int i = 0; i < passwordLength; ++i) {
|
||||||
s[i] = alphanum[rand() % (sizeof(alphanum) - 1)];
|
s[i] = alphanum[randombytes_uniform(sizeof(alphanum))];
|
||||||
}
|
}
|
||||||
|
|
||||||
s[passwordLength] = 0;
|
s[passwordLength] = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user