К примеру есть 2 Функции вида:
1. function encoder(Text : string):String;//шифратор
2. function decoder(Code : string):String;//дешифратор
Одна из реализаций...
Чтение из файла...читаем дешифруем
Код:
type
Trec : record;
rec1 : string;
rec2 : string;
end;
...
var
Rec : Trec;
begin
assignfile...
reset...
read(file, rec);
closefile...
with rec do
begin
rec1 := decode(rec1);
rec2 := decode(rec2);
end;
end;
Запись в файл...шифруем записываем
Код:
type
Trec : record;
rec1 : string;
rec2 : string;
end;
...
var
Rec : Trec;
begin
with rec do
begin
rec1 := encode(rec1);
rec2 := encode(rec2);
end;
assignfile...
rewrite...
wrile(file, rec);
closefile...
end;