Change generate to be cryptographically secure

/dev/urandom, BCryptGenRandom
This commit is contained in:
nikola
2024-07-02 11:57:00 +02:00
parent d5af421932
commit a01cfd8f25
4 changed files with 502 additions and 6 deletions

View File

@@ -142,7 +142,11 @@ std::optional<LoginInfoPointer> arg_new_password(Buffer &decrypted_buffer, Buffe
length = default_length;
}
generate_password(password, length);
if (!generate_password(password, length))
{
printf("error generating password\n");
return {};
}
}
else
{