I’m trying to make a very simple fast light-weight image encryption scheme work.
The basic idea is:
- read the image (a jpeg or something) data into a ByteArray
- cut the data into fixed-length pieces
- rearrange the order of the pieces
- write the data back to disk as a binary file
Decrytion is supposely exactly opposite:
First, I recreate the image’s ByteArray in its original order. So it’s basically an in-memory image data. Then, I thought, I could use a UILoader to display the image in Flash stage by loading this in-memory data through loadBytes method of UILoader.
But this did not work. UILoader got stuck and never fired its Complete event.
By the way, the project I’m working on is like a CD catalog (using Flash Projector) and I might not be able to write decrypted image to the disk and read it back in (this could be very slow too). So I have to make this thing purely in-memory.
Any help would be greatly appreciated.
Bob