Function KeyGen(Name,Key:String):String;
var i,j:Integer;
k:String;
begin
for i := 1 to length(Name) do
begin
j := ((byte(ord(Name[i])) + $1EE0) mod $1B) + 1;
k := k + chr(byte(ord(Key[j])));
end;
Result := k
end;
procedure TForm1.Button1Click(Sender: TObject);
var Name,Key:String;
begin
if Edit1.Text <> '' then
begin
Key := 'AaBbC0cDdEe1FfGgH2hIiJj3KkLMm4NnOoP5pQqRr6SsTtU7uVvWw8XxYyZ9';
Name := Edit1.Text;
Edit2.Text := KeyGen(Name,Key);
end;
end;