• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

encryption and decryption of mutimedia files

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
--Prasad
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic