AVI "encrypting"

AVI "encrypting"

Post by Quinc » Sat, 17 May 2003 23:21:59



We have a custom program that centers around image and avi files, and the
boss does not like that anyone can open our avi files because some of them
include proprietary customer packaging information.  These avi files can be
quite large (often over 100MB) and we have a system of encryption now where
we simply*up the header of the file in some format and give it a new
extension.  In our vb program, every time we access the file we simply fix
the header with a binary write, load the avi, and then*up the header
when we are finished.  This works great, but the boss now want to be able to
send the program out to run directly from CD.  We can not fix the header in
this fashion since we can't write to the CD.  I am looking for a way to fix
the header in the stream that comes in.  We currently use something like the
following...

    lRet=FixAVIHeader(Avi.sName)    'Custom function to fix the header
    lRet = AVIFileOpen(Avi.lpFile, Avi.sName, OF_READ, bytClassID(0))
    lRet = AVIFileGetStream(Avi.lpFile, Avi.lpStream, streamtypeVIDEO, 0)
    etc, etc,

AVIFileOpen blows up if the file has an invalid header.  How can I load this
avi with the hacked up header and fix the header in memory?

Any ideas would be much appreciated.

 
 
 

AVI "encrypting"

Post by Johan St?c » Tue, 20 May 2003 15:04:01



Quote:> We have a custom program that centers around image and avi files, and the
> boss does not like that anyone can open our avi files because some of them
> include proprietary customer packaging information.  These avi files can
be
> quite large (often over 100MB) and we have a system of encryption now
where
> we simply*up the header of the file in some format and give it a new
> extension.  In our vb program, every time we access the file we simply fix
> the header with a binary write, load the avi, and then*up the header
> when we are finished.  This works great, but the boss now want to be able
to
> send the program out to run directly from CD.  We can not fix the header
in
> this fashion since we can't write to the CD.  I am looking for a way to
fix
> the header in the stream that comes in.  We currently use something like
the
> following...

>     lRet=FixAVIHeader(Avi.sName)    'Custom function to fix the header
>     lRet = AVIFileOpen(Avi.lpFile, Avi.sName, OF_READ, bytClassID(0))
>     lRet = AVIFileGetStream(Avi.lpFile, Avi.lpStream, streamtypeVIDEO, 0)
>     etc, etc,

> AVIFileOpen blows up if the file has an invalid header.  How can I load
this
> avi with the hacked up header and fix the header in memory?

> Any ideas would be much appreciated.

What you could do is to leave the AVIFILEfunctions altogether and parse the
AVI file yourself.
This can be done in VB using binary reads.
Then you can handle a (intentionally) corrupted header with ease.
Given that you have access to a  suitable VfW codec, playing an AVI file can
be done via a series of DrawDibDraw:s
You could of course also skip the AVI file format and design your own.
Also definitely do-able in VB.

/Johan

 
 
 

1. ****"""""BUG IN PROGRAM"""*****

Does anyone have a problem using PhotoShop 3.  I have alien skin filters
and Kai's Power Tools and yet if I use the spheroid designer in Kai's Power
Tools and then try to add a drop shadow to it using alien skin, PhotoShop
crashes.  Has anyone got a solution to this problem.  It's really bugging
me (pun not intentional).

Yours Pete

2. What is Java?....coffee beans?

3. """"LOOKING FOR METRAEYES MODELLER AND TURBO.PXP FOR AN EXCHANGE"""""

4. HELP!!! I need s/n for KPT Gel plz!

5. Dss Satellite "HU"&"H"card programming click link

6. disappearing swatches

7. AVI to QT Utility: "Error -39", Sits and Beeps when Add button

8. grid over lines

9. ***WHICH IS BEST CAPTURE"SNAPPY""AIGOTCHA"?***

10. rendered avi "skip"

11. "Bad class AVI"

12. HELP - "mli"/"mat"

13. "Fur"/"hair" texture