Mega Code Archive

 
Categories / Delphi / Strings
 

Create speakable random passwords

function SpeakAblePassWord: string; const conso: array [0..19] of Char = ('b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z'); vocal: array [0..4] of Char = ('a', 'e', 'i', 'o', 'u'); var i: Integer; begin Result := ''; //randomize; for i := 1 to 4 do begin Result := Result + conso[Random(19)]; Result := Result + vocal[Random(4)]; end; end;