File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes encryption and decryption of  mutimedia files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "encryption and decryption of  mutimedia files " Watch "encryption and decryption of  mutimedia files " New topic

encryption and decryption of mutimedia files

prasad hagargi
Ranch Hand

Joined: Oct 21, 2002
Posts: 36
hi there,
how can i encrypt and decrypt mutimedia files using DES algorithm or any,iam trying read these files using objectinputsream and write using objectoutputstream.but iam getting "javax.crypto.Illegal BlockSizeException: Input length (with padding) not multiple of 8 bytes "exception.Please let me know ASAP what should be my aproach,should i use Java media Freamework API.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
I guess you get the error when encrypting?
Pad the input to be a multiple of 8 bytes and it should go away.
Then after decoding remove the padding again (you can use an extra datablock appended to the data (8 bytes of course because of the DES requiring that) to determine how many bytes to remove).

I agree. Here's the link:
subject: encryption and decryption of mutimedia files
Similar Threads
swing components gui
encryption of images and media files
Div inner Html to PDF
PDF generating program
Cant find J2ee.jar or servlet.jar in my jdk1.6 package.