A tip: few people are going to bother to read a large block of unformatted code. I'd suggest editing your post to restore the formatting by using the UBB code tags. The little CODE button under the entry area can help you out.
Thanks to the guys who moved my post to the right area and fixed up the code nice. I figured out this problem and now I'm having somet similar happen. the encrypted code is saved inside a microsoft access database column, when I try to pull it back out of the column and decrypt, it comes back as null, when there should be a value.
It works fine while just encrypting and decrypting but either something is going wrong while it's stored in the DB or it maybe it's a problem with the decryption function. If anyone has any ideas please post. PS: I can repost my decryption function code, I just wanted to know if anyone has had a similar problem before. This is the exception it throws:
javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher
Thanks for the reply, we narrowed it down to a DB problem, encrypted number going into the database, and on return it is decrypted to a null. We were using an Access database and now we are going to create a whole new system in MySQL. Maybe I can try a Database board and see if they have a solution for the MS Access decrypt problem. Once again thanks for the feedback!
Joined: Mar 22, 2005
"a database board" ??? What are you talking about? We have a JDBC forum right here! Don't you dare go someplace else
Joined: Mar 03, 2006
Sorry didn't mean offense, that is in fact where I went. Don't know what I was thinking it was getting late at work yesterday when I posted that Thanks for the help