mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 22:00:16 +08:00
Improve generated passwords by including numbers at a random position.
This commit is contained in:
@ -2465,11 +2465,14 @@ var
|
||||
const
|
||||
Consos = 'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ';
|
||||
Vocals = 'aeiouAEIOU';
|
||||
Numbers = '123456789';
|
||||
begin
|
||||
// Create a random, mnemonic password
|
||||
SetLength(Result, Len);
|
||||
for i:=1 to Len do begin
|
||||
if i mod 2 = 0 then
|
||||
if Random(4) = 1 then
|
||||
CharTable := Numbers
|
||||
else if i mod 2 = 0 then
|
||||
CharTable := Vocals
|
||||
else
|
||||
CharTable := Consos;
|
||||
|
Reference in New Issue
Block a user