[feat] remove 'I/l/O/o/0' from password generator

This commit is contained in:
dijunkun
2024-08-08 15:22:51 +08:00
parent 1f9614e060
commit f77e9fe6a8

View File

@@ -131,7 +131,7 @@ int Render::LocalWindow() {
if (!password_inited_) {
char a[] = {
"1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm"};
"123456789QWERTYUPASDFGHJKLZXCVBNMqwertyupasdfghijkzxcvbnm"};
std::mt19937 generator(
std::chrono::system_clock::now().time_since_epoch().count());
std::uniform_int_distribution<int> distribution(0, strlen(a) - 1);
@@ -143,6 +143,7 @@ int Render::LocalWindow() {
password_inited_ = true;
if (random_password_ != password_saved_) {
password_saved_ = random_password_;
LOG_INFO("Generate new password and save into cache file");
SaveSettingsIntoCacheFile();
}
}