Home > Back-end >  Who can help me put this code into a c #
Who can help me put this code into a c #

Time:09-21

decrypt function, you refer to the following Delphi code
Con1=8000;
Con2=8001;
AesEny=618;
//decryption
The function Decrypt (Str: string; The Key Word) : String;
Var
I, j: Integer;
S, R: AnsiString;
The begin
S:=AnsiString (Str);
R:=';
For I:=1 to (length (S) div 2) do
The begin
J:=(Integer (S/2 * I - 1) - 65) * 26.
J:=j + (Integer (S/2 * I) - 65);
R:=R + Ansichar (j);
end;
S:=R;
For I:=1 to Length (S) do
The begin
R: [I]=ansichar (byte (S) [I] xor (Key SHR 8));
[I] Key:=(byte (S) + Key) * Con1 + Con2;
end;
The Result: String=(R);
end;
  • Related