const cKey = '我是密钥我是密钥我是密钥我是密钥我是密钥我是密钥我是密钥我是密钥';function Encrypt(mStr: string; mKey: string): string; var I, J: Integer; begin J := 1; Result := ''; for I := 1 to Length(mStr) do begin Result := Result + Char(Ord(mStr[I]) xor Ord(mKey[J])); if J + 1 <= Length(mKey) then Inc(J) else J := 1; end; {自己加步骤} end;function Decrypt(mStr: string; mKey: string): string; var I, J: Integer; begin J := 1; Result := ''; {自己加步骤} for I := 1 to Length(mStr) do begin Result := Result + Char(Ord(mStr[I]) xor Ord(mKey[J])); if J + 1 <= Length(mKey) then Inc(J) else J := 1; end; end;procedure TForm1.Button1Click(Sender: TObject); begin Memo2.Text := Decrypt(Encrypt(Memo1.Text, cKey), cKey); end;
cKey = '我是密钥我是密钥我是密钥我是密钥我是密钥我是密钥我是密钥我是密钥';function Encrypt(mStr: string; mKey: string): string;
var
I, J: Integer;
begin
J := 1;
Result := '';
for I := 1 to Length(mStr) do begin
Result := Result + Char(Ord(mStr[I]) xor Ord(mKey[J]));
if J + 1 <= Length(mKey) then
Inc(J)
else J := 1;
end;
{自己加步骤}
end;function Decrypt(mStr: string; mKey: string): string;
var
I, J: Integer;
begin
J := 1;
Result := '';
{自己加步骤}
for I := 1 to Length(mStr) do begin
Result := Result + Char(Ord(mStr[I]) xor Ord(mKey[J]));
if J + 1 <= Length(mKey) then
Inc(J)
else J := 1;
end;
end;procedure TForm1.Button1Click(Sender: TObject);
begin
Memo2.Text := Decrypt(Encrypt(Memo1.Text, cKey), cKey);
end;
真的这么牛,能不能给一份源码我看看?
[email protected]
不是我牛,是人家现在的算法。
只是如果自己忘了密码的话,程序员也是没办法的。
我用这算法做了个小程序给自己写加密日记。明天给代码今天不早了,要吃饭
http://go6.163.com/dica/LeewaReader.exe
(特别注意,请使用NetAnt等软件下载。原因:网易免费空间不再提供直接下载——“很抱歉,目前网易免费个人主页系统暂停从其他主页系统对本系统非html页面的引用。”)
使用说明:
http://go6.163.com/dica/reader.txt
代码等我今天的工作告一段落时再给。
包含源代码、所有开发文档(任务书、需求分析、概要设计、详细设计、测试计划)。
(不过程序正在进行系统测试,不能保证没有Bug,但绝对好用)
如果想要,请给我发邮件:[email protected]
谢谢!
我也需要,150分换源代码,如何?
[email protected]
我也需要,[email protected]