Encrypt .res file.

F-IN-BOX for Delphi / Builder C++ / VCL
yallepaixao
Posts: 13
Joined: Sat Mar 03, 2007 7:35 pm

Encrypt .res file.

Postby yallepaixao » Sat Mar 03, 2007 10:37 pm

Hello,

I liked too much the component, but there are a problem. When I insert my files in a .res file it's hardly to user can "copy" my swf. Ok.

But easely a advanced user can open a .res file and save my "swf". There are many software to open .res. There are any way to encryp .res file and protect to open .res and copy my swf?

Thanks

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Re: Encrypt .res file.

Postby Softanics » Sun Mar 04, 2007 1:16 pm

yallepaixao wrote: I liked too much the component, but there are a problem. When I insert my files in a .res file it's hardly to user can "copy" my swf. Ok.

But easely a advanced user can open a .res file and save my "swf". There are many software to open .res. There are any way to encryp .res file and protect to open .res and copy my swf?


Thank you for your question.

You can encrypt your movie -- the simplest way is to use XOR: to encrypt you XOR each byte with some value, to decrypt XOR each encrypted byte with the same value.

Also you can put a movie into a static array.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

yallepaixao
Posts: 13
Joined: Sat Mar 03, 2007 7:35 pm

Postby yallepaixao » Wed Mar 07, 2007 2:41 am

Thank you!

I didnt understand your method XOR, can you post a example?
The component can read a encryp file?

Thank's

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Wed Mar 07, 2007 11:38 am

See sample Sample8_Streaming. It demostrates how to create ecrypted (by XOR) file and how to decrypt it on-the-fly and pass to the flash player. The piece of code:

Code: Select all

procedure TEncodingThread.Execute;
var
   b: Byte;
begin
   Synchronize(SetupProgressForm);

   while FSourceStream.Read(b, sizeof(b)) > 0 do
   begin
      b := b xor Mask;

      FDestStream.Write(b, sizeof(b));

      if ProgressForm.IsClosed then break;

      Synchronize(ChangeProgress);
   end;

   FSourceStream.Free;
   FDestStream.Free;

   Synchronize(CloseProgressForm);
end;
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 5 guests