哪位大侠可以帮忙提供一下加密和解密的配套算法,兄弟我不胜感激

解决方案 »

  1.   

    直接加密和解密算法{*******************************************************}
    {                                                       }
    {  Decrypt                                              }
    {                                                       }
    {  bitwise compare of each characters XOR 27            }
    {                                                       }
    {  Return string which after bitwise compare            }
    {                                                       }
    {*******************************************************}
    function Decrypt(s: string; Key: Integer = 27): string;
    var
      i: Integer;
    begin
      Result := s;
      for i := 1 to Length(s) do
        Result[i] := Chr(Ord(s[i]) xor Key);
    end;{*******************************************************}
    {                                                       }
    {  Encrypt                                              }
    {                                                       }
    {  Call again Decrypt to back to origin                 }
    {                                                       }
    {  Return string which after bitwise compare            }
    {                                                       }
    {*******************************************************}
    function Encrypt(s: string; Key : Integer =27): string;
    begin
      Result := Decrypt(s, Key);
    end;
      

  2.   

    这是最简单的方法,你在CSDN查一下,有一套非常完整的方法。