求用户登录的加密程序!
我想给每个用户的密码进行加密。相信这个对各位大侠来说是小菜一碟吧??

解决方案 »

  1.   

    想要简单的还是复杂的?
    简单的就是转成ASCII码,乘个数,加个数,
    或者转成二进制,左右移。
    复杂的有很多现成的算法,上网找吧。
      

  2.   

    提供这个算法给你直接加密和解密算法:{*******************************************************}
    {                                                       }
    {  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;
      

  3.   

    function code(s:string):string;
    var i:integer;temp:string;
    begin
    temp:=s;
    for i=1 to length(temp) do
     temp[i]=temp[i]+i-1;
    result:=s;
    end;function decode(s:string):string;
    var i:integer;temp:string;
    begin
    temp:=s;
    for i=1 to length(temp) do
     temp[i]=temp[i]-i+1;
    result:=s;
    end;
      

  4.   

    http://www.csdn.net/Dev/Delphi/vcl/vcltools/
      

  5.   

    想要简单的还是复杂的?
    简单的就是转成ASCII码,乘个数,加个数,
    或者转成二进制,左右移。
    复杂的有很多现成的算法,上网找吧。
    我就用的这样
      

  6.   

    想要简单的还是复杂的?
    简单的就是转成ASCII码,乘个数,加个数,
    或者转成二进制,左右移。
    复杂的有很多现成的算法,上网找吧。那,怎么转回来呢?
      

  7.   

    什么转回来啊,做成单向不可逆的,密码无法被还原。现成的算法代码也有啊,ras,md5等等
      

  8.   

    http://expert.csdn.net/Expert/topic/1708/1708791.xml?temp=.3030054
      

  9.   

    需求不清
    你查enscrpt应能查到不少
      

  10.   

    : DelUser(探索者) 的算法我在书上看过哦呵
      

  11.   

    要加密?用这个吧
    http://www.delphipages.com/news/detaildocs.cfm?ID=20