Now i have create a table as loginuser table.I need encode the Password string in delphi and save it into loginuser table.But i don't know what function can do that.But i am so busy that i can write a customer function to encryption that.how to do it well?I need you help.Thanks!
And then i find a encrypt function,but run with something wrong.
error message is : key is out of range .why?
function Encrypt(const S: String; Key: Word): String;
C1 = 52845;
C2 = 11719;
Key = 1234;
Result := S;
for I := 1 to Length(S) do
Result[I] := char(byte(S[I]) xor (Key shr 8));
Key := (byte(Result[I]) + Key) * C1 + C2;