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.
LVL 1
pixayaAsked:
Who is Participating?
 
wings_gauravConnect With a Mentor Commented:
hi,

Flash 8 dies give binary data handling and also allows creating movie clips from binary data. However, this is not possible with Flash 7 (MX 2004).

-wings
0
 
pixayaAuthor Commented:

Soz, not sure if it will make any difference but I am using Flash MX 2004...
0
 
MontoyaProcess Improvement MgrCommented:
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.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
pixayaAuthor Commented:
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.
0
 
pixayaAuthor Commented:

typo... "sort the image" should be "store the image"
0
 
pixayaAuthor Commented:

lol and another typo... "some form var" should be "some form of var"
0
 
pixayaAuthor Commented:
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...?
0
 
wings_gauravCommented:
typo: Flash 8 does give binary data handling
0
 
pixayaAuthor Commented:

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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.