[BlueLeaf1336]>
PROGRAM>
Natural Born Junk>
簡易パスワード発生器
2002/10/29:作成
本当に簡易。
function EasyPassword(pLength: integer = 8): string;
const
SOURCE = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
var
i: integer;
SrcLen: integer;
begin
if pLength < 6 then pLength := 6;
if pLength > 20 then pLength := 20;
Result := '';
SrcLen := Length(SOURCE);
for i := 0 to pLength - 1 do
begin
Result := Result + SOURCE[Random(SrcLen) + 1];
end;
end;
procedure TForm1.Button9Click(Sender: TObject);
var
i: integer;
begin
for i := 0 to 19 do
begin
ShowResult(EasyPassword(20));
end;
end;