¡He aquí la solución a todos tus problemas! Jajaja acá te muestro como separar un texto en parejas de caracteres:
Código Delphi
[-]
function CifrarEnHill(S:String):String;
var
Aux:String;
I:Integer;
begin
Aux:='';
I:=1;
while (I<=Length(S)) do begin
Aux:=Aux+S[i]+S[I+1]+' ';
I:=I+2;
end;
if (Aux[Length(Aux)]=' ') then
SetLength(Aux,Length(Aux)-1);
Result:=Aux;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit2.Text:=CifrarEnHill(Edit1.Text);
end;
Creo que eso es lo que querías.
Saludos!
EDITO: eso es lo que entendí yo, pero no sé si es lo que pedías.