• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 790
  • Last Modified:

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.
0
pixaya
Asked:
pixaya
  • 6
  • 2
1 Solution
 
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
 
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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:
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
 
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now