var s1:string; function GetKey(aKey:string;aPercent:Double):string; var i:integer; begin SetLength(Result,Length(aKey)); for i:=1 to Length(aKey) do begin Result[i]:=Chr(Round(Ord(aKey[i])*aPercent)); end; end;
function EnCode(aCryptograph,aKey:string):string; var i,keylen,codelen:integer; begin keylen:=Length(akey); codelen:=Length(aCryptograph); SetLength(Result, Length(aCryptograph)); for i:=1 to codelen do begin Result[i]:=Chr(Ord(aCryptograph[i])+Ord(aKey[(i mod KeyLen)+1])); end; end;
function DeCode(aCryptograph,aKey:string):string; var i,keylen,codelen:integer; begin keylen:=Length(akey); codelen:=Length(aCryptograph); SetLength(Result, Length(aCryptograph)); for i:=1 to codelen do begin Result[i]:=Chr(Ord(aCryptograph[i])-Ord(aKey[(i mod KeyLen)+1])); end; end;
begin { TODO -oUser -cConsole Main : Insert code here }