The more complicated way of Encoding

F-IN-BOX for Delphi / Builder C++ / VCL
rimasx
Posts: 7
Joined: Tue Jul 21, 2009 5:00 am
Location: USA

The more complicated way of Encoding

Postby rimasx » Wed Jul 22, 2009 1:15 pm

Hello

Is there any more complicated way of encoding my flv files to eff ? Can I use my own some encryption/decryption "key" :?: Please let us know other ways , different from

Code: Select all

 // Encoding (very simple)
         DestStream.Write(IsSWF, sizeof(IsSWF));
         EncodingThread := TEncodingThread.Create(SourceStream, DestStream, SourceStream.Size);


that was shown in Sample8_Streaming example tutoreal.
We'd like to get shure that our encoded videos will not be decoded by the exe from this example :!:

Best Regards

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

Postby Softanics » Wed Jul 22, 2009 2:21 pm

Thank you for your question.

Yes, of course; you can use any algorithm, you just decode bytes from FSourceStream to FDestStream:

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;


Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

rimasx
Posts: 7
Joined: Tue Jul 21, 2009 5:00 am
Location: USA

Some demo source please

Postby rimasx » Thu Jul 23, 2009 3:52 am

Could you produce a demo tutorial with encryption\decryption functions of FlashPLayerControl component, because, in my humble opinion it is the one of the fundamental and useful fitures ot your ptoduct. :idea:
... and I coannot find enough help material about this subject :?

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

Postby Softanics » Thu Jul 23, 2009 12:56 pm

But this sample is exact what you need: encryption/decryption is just a XOR operation.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

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

rimasx
Posts: 7
Joined: Tue Jul 21, 2009 5:00 am
Location: USA

one more question about eff extension

Postby rimasx » Thu Aug 06, 2009 6:24 am

You are right..

The encryption/decryption key is

Code: Select all

const Mask = $43 

in your sample kode 8)

So how can I change the .EFF extension of my encoded files for my own, say, .XYZ extension :?:

I mean, i would like the program to encode flv files in xyz format.. I dont want to change eff extension for xyz manually

regards

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

Postby Softanics » Thu Aug 06, 2009 2:00 pm

Not sure that understood your question right, but... replace just all "eff" into "xyz" in source code...

Thank you.
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 4 guests