Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another code question
#1
So this is a bit less simple than my last code-related question, but it's once again for my senior project. For anyone who either didn't see my last thread or just forgot, said project is a simple chatting client, written in Java, and tailored to be used by the ITS department for students who want to contact them but not use the phone. I've been implementing an encryption scheme, and at first it seemed to work just fine. Up until recently I had just been testing it with my laptop and desktop (both running Windows 7) as the two ends of the conversation and it worked fine. I'd have the occasional error with the very first message that it sent (the username), and that would end up displaying as "null" instead of what the user puts in. That was rare, though, and if it happened, the other messages went through just fine.

Recently, however, I decided to try it out with a lab computer (all of which are now iMacs). I start it up, connect, and what happens? Some sort of padding-related exception gets thrown. I believe it was a BadPaddingException, but I'm not positive - I'll try it out again tomorrow and update this with the exact error message, etc. I'm also not sure about this part, but I think it gets thrown during the Cipher.doFinal() call when I'm doing decryption (i.e. it gets the encrypted message and then craps out). I haven't tried it going from Mac to Mac, nor have I even touched Linux yet, but I'm wondering - has anyone here worked with encryption in Java and has insight on what the problem here is? I can give details of the scheme I'm using (it's slightly strange) if people want, but I'm working mostly with classes in the java.Security and javax.Crypto packages.
Reply


Messages In This Thread
Another code question - by Lord Xela - 2011-02-22, 02:10 AM
Another code question - by AngelSL - 2011-03-01, 10:29 AM
Another code question - by Nikkey - 2011-03-01, 12:57 PM
Another code question - by AngelSL - 2011-03-03, 06:01 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)