论坛: 编程破解 标题: DELPHII下的简单加密方式!(讲解!!!) 复制本贴地址    
作者: zhanjiajun [zhanjiajun]    论坛用户   登录


文件的简单加密,可以用流文件进行操作,将文件分成任意部分,从中断开,顺序打乱存贮,然后在文
件前后加入字符,如何比较出错,则不进行重新整合!

for i := 0 to Length('比较字符') do
  begin
    MainFile.Read(StrRead[i], I);
    if strCheck[i]<>strRead[i] then
    begin
      MainFile.Free;
      Raise Exception.Create('File Error!!');//文件读入错误
    end;
  end;

  MainFile.Seek(-19, SoFromEnd);
  For i := 1 to Length('比较字符') do
  begin
    MainFile.Read(StrRead[i], I);
    if  strCheck[i]<>strRead[i] then
    begin
      MainFile.Free;
      Raise Exception.Create('Flase ');
    end;

主要用的类就是:
          TFileStream (for working with files)
TStringStream (for manipulating in-memory strings)
TMemoryStream (for working with a memory buffer)
TBlobStream (for working with BLOB fields)
TWinSocketStream (for reading and writing over a socket connection)
TOleStream (for using a COM interface to read and write)

同时,可以将这种功能做成类,方便调用.TBlobStream在,数据数据库通信方面是使用是很方便的.我用这个东西做过在ACCESS下,记记录后重写结构的东东,不错.


[此贴被 飘渺虚心(zhanjiajun) 在 03月18日12时44分 编辑过]


[此贴被 飘渺虚心(zhanjiajun) 在 03月18日12时45分 编辑过]

地主 发表时间: 05-03-18 09:32

回复: 286 [unique]   版主   登录
我没看懂你说的是什么,是问题,还是讲解?

B1层 发表时间: 05-03-18 12:41

回复: zhanjiajun [zhanjiajun]   论坛用户   登录
286,在不在,小弟有问题请教或!在UNIX中, 我找了一些资料,都对不上号呀!

B2层 发表时间: 05-03-18 12:46

论坛: 编程破解

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号