Delphi  Internet
  Delphi

    * Delphi IDE
    * Delphi  Web
    * MS Agent  Delphi
    *  
    *  Delphi
    *  
    *  Delphi



    * RSS- 
    * RSS- Delphi

#
 3D
#
 RSS- Delphi
   .  .
 HTML  PHP
  .    - .
    MS Agent.
   .
RAD Studio 2010   !
MySQL  Delphi. Express-
   Delphi
        
#
 
#
 
#
-
4 spam comments
blocked by
Akismet
#
 
                                   bubble.us Delphi DLL Google IDE IEnumVariant jpeg MMSystem MS MS Agent MS Agent Control OLE PixelsPerInch TAgent Teamer Timer TTimer
#
   
# 
1 , 12 , 39   47 .
#  
2 , 14 , 51   32 .
#
Users

    * admin (12)
      13 Aug 2009 10:44:11 GMT+4

    *
      
          o Site Admin
          o Log out
          o  XHTML
          o WordPress

GetRank - Webmaster and Seo Tools
   .  .
:  ,  Delphi. : admin.  12 Aug 2009  7:47 pm 

,     ,           N- .   .



Crypto_1



001

:  10     :)

,        2  -,  -        .     ,     ,  :   webdelphi.ru.        .

:     ?

     ,          .             .     ,    jpg-    ,     .          ,    ,        .

 , ,     . - JPEG           ,    .    ,     ,        JPG-,     : 1  ( ) 2  (  ),   3-      ,   , ..      ,    .

 ,    ,     ,      . ,     :

   1.            
   2.         
   3. ,    ,        .
   4.      .

  ,     Delphi. -,    :
?View Code DELPHI

type
TCryptoKey = record
Step   : byte;                  //  
length : word;               //    
TextLength: integer; //  
TextParts: byte;          //  
end;

 ,             .

        :
?View Code DELPHI

procedure PictCrypt(SourceFile, TargetFile: TFileName; CryptoKey:TCryptoKey; Text:String);
var FS, FT: File;
i,j,part:integer;
buf2: byte;
doWT: boolean; //   
ch:string[1];
begin
//   
TextParts:=GetTextParts(Text, CryptoKey);
doWT:=false;
AssignFile(FS,SourceFile);
AssignFile(FT, TargetFile);
Reset(FS,1);
Rewrite(FT,1);
for I := 0 to FileSize(FS)-1 do
begin
if i=jpg_header+1 then
begin
//   
BlockWrite(FT, CryptoKey,Sizeof(CryptoKey));
doWT:=true;
part:=0; //      
end;
if (doWT)and ((FilePos(FT) mod CryptoKey.Step)=0)and(part&lt;=Length(TextParts)-1)  then
begin
for j:=1 to Length(TextParts[part]) do
begin
ch:=(copy(TextParts[part],1,1));
delete(TextParts[part],1,1);
BlockWrite(FT, ch ,sizeof(Ch));
end;
part:=part+1;
end;
BlockRead(FS, buf2, Sizeof(buf2));
BlockWrite(FT, buf2,Sizeof(buf2));
end;
CloseFile(FT);
CloseFile(FS);
end;

 ,     ,     :
?View Code DELPHI

function PictDeCrypt(SourceFile: TFileName):string;
var i,j,k:integer;
buf: TCryptoKey;
FS: File;
pt: string[1];
begin
AssignFile(FS,SourceFile);
reset(FS,1);
for I := 0 to FileSize(FS)-1 do
begin
Seek(FS,jpg_header+1); //    
BlockRead(FS, buf,Sizeof(buf));
CryptoKey:=buf;
//  ,   
LengthTextParts:=GetLengths(CryptoKey);
end;
for I:=FilePos(FS) to FileSize(FS)-1 do
begin
Seek(FS, i);
if ((i mod CryptoKey.Step)=0) then
begin
if i&gt;=jpg_header+sizeof(buf)+1 then
begin
for k:=0 to Length(LengthTextParts)-1 do
begin
for j:=1 to LengthTextParts[k] do
begin
BlockRead(FS, pt ,Sizeof(pt));
Result:=Result+pt;
end;
Seek(FS,FilePos(FS)+CryptoKey.Step-sizeof(pt));
end;
break;
end;
end;
end;
CloseFile(FS);
end;

 ,         ,   . c  c  :
?View Code DELPHI

function GetLengths(CryptoKey: TCryptoKey):TLengthTextParts;
var i:integer;
begin
//      
SetLength(Result, CryptoKey.TextParts);
for I:=1  to CryptoKey.TextParts-1 do
Result[i-1]:=CryptoKey.length;
{    }
Result[Length(Result)-1]:=CryptoKey.length+(CryptoKey.TextLength-CryptoKey.length*CryptoKey.TextParts);
end;

    :

screenprog

  :  ,    ,   ,     ,    .

 ,               :

     (   )   ,     ,  ,        .   ,      1500  ,       .

         ,   , - :),        ,  ,   . ,   ,    .  -            ,         .  ,      .

,  -   ,        ,     .

  :
CryptoPict(263.82 KB) -     
:

    * Print this article!
    * Digg
    * Sphinn
    * del.icio.us
    * Facebook
    * Mixx
    * Google Bookmarks
    * Turn this article into a PDF!
    * RSS

  .
 (0)

  

 .

RSS- .   
 
   admin.  

																	
Path: p





