Link to home
Start Free TrialLog in
Avatar of pixaya
pixaya

asked on

Decrypt encrypted JPEG?

Hi,

I've been messing around with Flash making so that I can watch a live video stream from a webcam by requesting the JPEG's from a server application I have written. This works fine by using the MovieClip.loadMovie(theURL); method and I can watch the stream at 25fps. At this point I should point out that I'm not exactly a pro when it comes to flash.

The reason I have been messing around with flash is to see whether I can use it to replace and EXE I wrote that does the same thing, requests JPEG's from the server app, and it appears that flash can do everything I can currently do in the EXE, with one difference, encryption.

The current EXE receives and encrypted stream via its TCP connection from the server app, which is then decrypted and used to create the Image object. The current algorithm I am using is CAST 128. What I would like to know is first how do I receive a stream and then load that into some form of image object so that I can display it (via TCP if possible), and then how do I add a decryption algorithm to it so that I can receive and decrypt the data and then make an image out of it?

Hope that makes sense?!

Craig.
Avatar of pixaya
pixaya

ASKER


Soz, not sure if it will make any difference but I am using Flash MX 2004...
Avatar of Montoya
pixaya,

Im not aware of anything in flash that would allow you to do that. All I can say is that perhaps you would have to do that encryption server side. However, I know that would not server your purposes. I believe you can do something like that in Lingo, the language for Director, but I dont think you can do that in Flash. Perhaps someone else will chime in and educate me as well.
Avatar of pixaya

ASKER

Hi,

Do you know how to get a stream from a url and then load it as an image object? What I mean by that is something like:

var imgData = getURL(pathToImage);

MovieClip.setMovie(imgData);

I know that the methods above do not exist, but that's the sort of thing I would like to get going because if I can sort the image data in some form var then in theory I could then pass that data to an algorithm to decrypt it.
Avatar of pixaya

ASKER


typo... "sort the image" should be "store the image"
Avatar of pixaya

ASKER


lol and another typo... "some form var" should be "some form of var"
Avatar of pixaya

ASKER

Hi,

This appears to be another one of my questions that there isn't an answer to. Why do I always need to do the impossible? Lol!

Ok, so using the XMLSocket I have now worked out how I can pass information between flash and the server application. As far as I am aware you can only pass string data using this method.

This there a way of receiving the JPEG data via the XMLSocket and then creating a image / movie clip from that?

IS ANY BODY OUT THERE...?
ASKER CERTIFIED SOLUTION
Avatar of wings_gaurav
wings_gaurav

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
typo: Flash 8 does give binary data handling
Avatar of pixaya

ASKER


Thanks for the info wings, I'll download the Flash 8 trial and give it a go. So I guess for pointing me in the right direction I will award you the points.

Craig.