• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Help! Problem with Encryption!

 
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to create a key, use that to encrypt something and then use it to decrypt. I am using the example DESExample that comes with bouncy castle. It throws this exception in decrypting everytime:
org.bouncycastle.crypto.DataLengthException: last block incomplete in decryption
It happens in: org.bouncycastle.crypto.BufferedBlockCipher.doFinal(...) (or if I change to use the newer class, it still occurs in: org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher.doFinal(...) )
Does anyone know what this problem could be? The example:
 
You've gotta fight it! Don't give in! Read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic