This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image (JPEG, TIFF) encryption, please help.

 
Peter Mod
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone:

I am a beginner on J2ME. I started learning about bouncy castle API for J2ME lightweight encryption. I have difficult time to find example for image (JPEG and TIFF) encryption. I am using MIDP and the app will run on Palm OS 5.* and up. Please help.

Thank you so much for your help!!
Peter Mod.
 
sri ramu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,

c when u are going for the Encryption u can go in 2 ways . one is by using the Text message as such as a String . Another way is we can do it by bit Streams. Y cant u try using a File stream as a Bit Stream and do tht encryption Part...
still had some queries mail me : sriramusr@yahoo.co.in

- replied by Sri Ramu SR.
 
Jon Eaves
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ignore the response that you got. They are wrong.

There's no such thing as Text or Image for the encryption algorithms provided by BouncyCastle. (or any other library that I am aware of)

It's just a bunch of byte[]. That's all that matters. So, just grab the bytes from the Image or String (in any way that you like) and then feed those bytes into the encryption algorithms.

Strings are generally used for examples, because it's easy to see, but you can trivially change the String.getBytes() to Image.getBytes() and that will work in exactly the same way.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic