其实放在那都有办法跟踪到,最好分割开放在不同的地方。给你一个加密的例子
program Crypt;
uses wincrt;
const
C1 = 52845;
C2 = 22719;
//C1,C2是加密的公匙,Key是私匙
function Encrypt(const S: string;Key : Word):String;
var
i:byte;
begin
result[0] := S[0];
for i := 1 to Length(S) do
begin
result := char(byte(S) xor (Key shr 8));
Key := (byte(result)+key)*C1+C2;
end;
end;
function Decrypt(const S: string;Key : Word):String;
var
i:byte;
begin
result[0] := S[0];
for i := 1 to Length(S) do
begin
result := char(byte(S) xor (Key shr 8));
Key := (byte(result)+key)*C1+C2;
end;
end;
//这是个调用的实例:
var
S:string;
begin
write('>');
readln(S);
s := Encrypt( s, 12345);
writeln(s);
s := Decrypt( s, 12345);
writeln(s);
end.