Home > Back-end >  Delphi code to Java code
Delphi code to Java code

Time:10-07

 
The function EnCode (const S: a string; The Key Word) : string;
Var
I: Byte;
The begin
Setlength (Result, length (s));
For I:=1 to Length (s) do the begin
Result: [I]=char (byte (s) [I] xor (key SHR 8));
Key:=(byte (Result [I]) + key) * c1 + c2;
end;
end;

The c1 and c2 are two constants,
I don't understand is the Result: [I]=char (byte (s) [I] xor (key SHR 8)); How to turn here?
Char accounted for a byte in Delphi, in Java char of two bytes, how should do
  • Related