descrypt.pas
来自「参照上兴、鸽子等源码编写编写出来的。 编译环境:Delphi7+SP+DP」· PAS 代码 · 共 30 行
PAS
30 行
unit DESCrypt;
interface
uses
SysUtils,Classes;
function StrDecrypt(str: string): string;
implementation
function StrDecrypt(str: string): string;
var
X, Y: Integer;
A: Byte;
Key: string;
begin
Key := '123456789'; //注意了,這裡要和加密鑰匙一樣.
Y := 1;
for X := 1 to Length(Str) do
begin
A := (ord(Str[X]) and $0F) xor (ord(Key[Y]) and $0F);
Str[X] := char((ord(Str[X]) and $F0) + A);
Inc(Y);
if Y > length(Key) then Y := 1;
end;
Result := Str;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?