Improve generated passwords by including numbers at a random position.

This commit is contained in:
Ansgar Becker
2011-02-05 06:45:38 +00:00
parent ca58d88410
commit 446eef2a40

View File

@ -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;