ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Encrypt complete ImageEn saved file

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
yogiyang Posted - Nov 14 2013 : 07:24:03
I want to Encrypt file save by ImageEn using the function LayersSaveToFile.

How can I do this?

Using this function means ImageEn will save the data of all layers to a custom internal ImageEn format.

TIA




Yogi Yang
1   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Nov 27 2013 : 07:55:46
You could encrypt/decrypt each layer with Proc.Encrypt and Proc.Decrypt. For example:

// encrypt and save
var
  i: integer;
begin
  for i := 0 to ImageEnView1.LayersCount - 1 do
  begin
    ImageEnView1.LayersCurrent := i;
    ImageEnView1.Proc.Encrypt('secret', ieeaTEA2);
  end;
  ImageEnView1.LayersSaveToFile('test.dat');
end;

// load and decrypt
var
  i: integer;
begin
  ImageEnView1.LayersLoadFromFile('test.dat');
  for i := 0 to ImageEnView1.LayersCount - 1 do
  begin
    ImageEnView1.LayersCurrent := i;
    ImageEnView1.Proc.Decrypt('secret', ieeaTEA2);
  end;
end;