Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help! Problem with Encryption!  RSS feed

 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • 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:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!