function EnCode(const S: string; Key: Word): string;
var
I : Byte;
begin
setlength(Result, length(s));
for i := 1 to Length(s) do begin
Result[i] := char(byte(s[i]) xor (key shr 8));
key := (byte(Result[i]) + key) * c1 + c2;
end;
end;
其中c1和c2是兩常量。
我不明白的是Result[i] := char(byte(s[i]) xor (key shr 8));這里改怎么轉?
在delphi中char占一個位元組,java中char占兩個位元組。該怎么做
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/120058.html
標籤:語言基礎/算法/系統設計
