计算字符的ASCII码,再适当的变换即可
解决方案 »
- 求一个字符串比较算法
- 我的数据库动态连接老是不管用
- 请教Delphi高手们, application.Destroy; application.Terminate; application.Free; halt; 有什么具体的区别?要结束程序,用哪个好些呢?
- 有关sender传递的问题。
- 如何使图片(TImage)显示在一些特殊控件的上方,如(TOleContainer,TWebBrowser)
- 求助:多层动态数据库连接问题?在线等
- 在访问access数据库时,用sql语句问题。
- 1。怎样实现类似photoshop的图层? 2。怎样撤销和重复一个画图操作?
- 怎样用select into 语句把Sql中的表导入ACCESS中?
- 关于ADO方面的问题,高手请进!
- 一个PASCAL小程序,望各位大虾帮忙看看
- 关于 Delphi+oracle 的问题
s[i]:=chr(ord(s[i])xor 255);
F:TextFile;
S:string;Assignfile(F1,'file1.txt');
Rewrite(F1);
for i:=0 to memo1.Lines.Count-1 do
begin
s:=memo1.lines.Strings[i];
for j:=1 to length(s) do
s[j]:=chr(ord(s[j])xor 255);//写时加密
writeln(F1,s);
end;
CloseFile(F1);Assignfile(F1,'file1.txt');
Reset(F1);
while not Eof(F1) do
begin
Readln(F1,s);
for i:=1 to length(s) do
s[i]:=chr(ord(s[i])xor 255);//读时解密;
memo1.lines.Add(s);
end;
CloseFile(F1);
// uTBase64 v1.0 - Simple Base64 encoding/decoding class
// Base64 described in RFC2045, Page 24, (w) 1996 Freed & Borenstein
// Delphi implementation (w) 1999 Dennis D. Spreen ([email protected])
// This unit is freeware. Just drop me a line if this unit is useful for you.
email:[email protected]
不过,如果真要提高还是建议你去看一些加密算法方面的书籍,这个只能救急,治标不治本。