小虫不懂delphi现在有一小段delphi的算法,求助翻译为Java,非常感谢!!function DecryptStr(const S: string; Key: Word): string;
var
i: Byte;
t: LongWord;
begin
SetLength(Result, Length(S));
for i := 1 to Length(S) do
begin
Result[i] := Char(Byte(S[i]) xor (Key shr 8));
t := Byte(s[i]) + Key;
Key := Word(t);
end;
end;
var
i: Byte;
t: LongWord;
begin
SetLength(Result, Length(S));
for i := 1 to Length(S) do
begin
Result[i] := Char(Byte(S[i]) xor (Key shr 8));
t := Byte(s[i]) + Key;
Key := Word(t);
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货