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

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
masrnet2006 Posted - Dec 05 2012 : 04:32:35
ImageEnView1.Proc.Encrypt(Captiva);
ImageEnView1.Proc.Decrypt( Captiva );
-----------------------------------
Encrypt is not good you can sea the image in the windows photo viewer


9   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Sep 11 2016 : 21:13:58
Hi

When using the Encrypt method, ensure you use the ieeaTEA2 algorithm.

Source



Older ieeaTEA Algorithm



ieeaTEA Algorithm



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
masrnet2006 Posted - Jan 14 2013 : 04:16:13
*.png is very good and Call the function again to decrypt it
EncryptBMP(ImageEnView1.Bitmap, 623);
ImageEnView1.Refresh;
ImageEnView1.IO.SaveToFile('C:\jpg_test\crypted_623.png');
masrnet2006 Posted - Jan 14 2013 : 04:09:44
procedure TForm1.EncryptBMP(const BMP: TBitmap; Key: Integer);
var
  BytesPorScan: Integer;
  w, h: integer;
  p: pByteArray;
begin
  try
    BytesPorScan := Abs(Integer(BMP.ScanLine[1]) -
      Integer(BMP.ScanLine[0]));
  except
    raise Exception.Create('Error');
  end;
  RandSeed := Key;
  for h := 0 to BMP.Height - 1 do
  begin
    P := BMP.ScanLine[h];
    for w := 0 to BytesPorScan - 1 do
      P^[w] := P^[w] xor Random(256);
  end;
end;

------------------
procedure TForm1.btn_encrypt_1Click(Sender: TObject);
begin
 EncryptBMP(ImageEnView1.Bitmap, 623);
 ImageEnView1.Refresh;
  ImageEnView1.IO.SaveToFile('C:\jpg_test\crypted_623.JPG');

end;
fab Posted - Dec 22 2012 : 08:29:12
As specified in the documentation you CANNOT use LOSSY formats (like jpeg or tiff-jpeg).
masrnet2006 Posted - Dec 22 2012 : 02:02:10
APPLICATION Encrypt Demo IN SAMPLE
IF Encrypt AND SAVE *.JPG AND CLOSE APP. AND OPEN NOT DECRYPT WORK
BUT SAVE *.PNG OR TIF WORK GOOD
w2m Posted - Dec 12 2012 : 07:12:55
This is the encrypted image:


314.23 KB

Your test image was a 24-bit with alphachannel lossy jpg file. I removed the alphachannel and saved as a lossless format before enctypting the image. The image should be saved using lossless formats and in full rgb color spaces (no palette).

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
masrnet2006 Posted - Dec 11 2012 : 23:58:46
please Encrypt this image end test

w2m Posted - Dec 11 2012 : 10:19:35
When I encrypt an image with ImageEnView1.Proc.Encrypt here the original image is not visible in ImageEn or in windows photo viewer or any other viewer with Windows 7.

If you are calling ImageEnView1.Proc.Encrypt('Captiva') Immediately followed by ImageEnView1.Proc.Decrypt('Captiva') you are encrypting the image then immediately unencrypting the image. Just call ImageEnView1.Proc.Encrypt('Captiva') to encrypt it.
Encryped image

60.2 KB
Original Image

83.83 KB
Does your image become scrambled when you encrypt the image with ImageEnView1.Proc.Encrypt('Captiva') when viewing the image in ImageEnView1?

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
masrnet2006 Posted - Dec 11 2012 : 04:58:38
ImageEnView1.Proc.Encrypt(Captiva);
ImageEnView1.Proc.Decrypt( Captiva );
-----------------------------------
Encrypt is not good you can sea the image in the windows photo viewer