//RSA的加密和解密函数,等价于(m^e) mod n(即m的e次幂对n求余)
function Encrypt_Decrypt(m: Int64; e: Int64=$2C86F9; n: Int64=$69AAA0E3): Int64;
var
a, b, c: Int64;
begin
a:=m;
b:=e;
c:=1;
while b<>0 do
if (b mod 2)=0
then begin
b:=b div 2;
a:=(a * a) mod n;
end
else begin
b:=b - 1;
c:=(a * c) mod n;
end;
Result:=c;
end;