I need help to code my data before store it on data base and decode it when I want to use it
any help please
function transcode(S,K:byte):byte;
var
i:integer;
begin
i:=s xor k;
if i>255 then
i:=i-255;
if i<0 then
i:=i+255;
result:=i;
end;
function EnCode(Source:String;Key:Byte):String;
var
i:integer;
begin
if length(source)=0 then exit;
Result:='';
for i:=1 to length(source) do
begin
Result:=Result+chr(transcode(ord(source[i]),key));
end;
end;
function Decode(Source:String;Key:Byte):String;
begin
Result:=Encode(source,key);
end;
Users browsing this forum: No registered users and 16 guests