• 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

Error message: "pad block corrupted"

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm developing a MIDlet for SMS encrypting. I use the AESlight (Rijndael) algorithm for cipher/decipher (usign Bouncy Castle APIs).
I cipher the sms then I send it as a BINARY message (because I can't trasform the ciphered text froma byte array to a String and then back to a byte array, without loosing data).
But when I decipher the received sms i get the "pad block corrupted" error message.
I tried to test if the decipher code was right adn it is, in fact on the sender side it decipher correctly the ciphered text. Then I checked if the received byte array would be the same of the sent one, and still it's right!

Here is the code I use to decipher:




Can someone help me finding a solution?
Is the problem in the binary message?
Here the code of sending the binary message:




Thank you in advance!
reply
    Bookmark Topic Watch Topic
  • New Topic