Re: [OT] Re: Encryption / decryption problem in multi threading

2006-06-11 Thread Shshank Jain
yup encoding was the main issue and i had also not made the encrypt/decrypt function synchronized , these were the two problems On 6/10/06, Scott Van Wart <[EMAIL PROTECTED]> wrote: Shshank Jain wrote: > the problem was muti threading (the sychronized block) plus the > database had > the passwo

Re: [OT] Re: Encryption / decryption problem in multi threading

2006-06-09 Thread Scott Van Wart
Shshank Jain wrote: the problem was muti threading (the sychronized block) plus the database had the password field as varchar i encoded the data and make the character encoding base 64 ( http://forum.java.sun.com/thread.jspa?threadID=555631&messageID=2729521) and it works now So was it solely

Re: [OT] Re: Encryption / decryption problem in multi threading

2006-06-09 Thread Shshank Jain
he dave !! problem solved !! the problem was muti threading (the sychronized block) plus the database had the password field as varchar i encoded the data and make the character encoding base 64 ( http://forum.java.sun.com/thread.jspa?threadID=555631&messageID=2729521) and it works now Thanks fo

Re: [OT] Re: Encryption / decryption problem in multi threading

2006-06-09 Thread Shshank Jain
i will run some test cases here and get back... i ran it sequentially it worked fine On 6/9/06, Dave Newton <[EMAIL PROTECTED]> wrote: Shshank Jain wrote: > making the decryt/encrypt synchronized didnt help Ok. Dave PS If the only difference is single- vs. multi-threaded then I'll almost

Re: [OT] Re: Encryption / decryption problem in multi threading

2006-06-09 Thread Dave Newton
Shshank Jain wrote: > making the decryt/encrypt synchronized didnt help Ok. Dave PS If the only difference is single- vs. multi-threaded then I'll almost guarantee you you're walking on something, somewhere, even if it's in your test code. -

Re: [OT] Re: Encryption / decryption problem in multi threading

2006-06-09 Thread Shshank Jain
making the decryt/encrypt synchronized didnt help -Shanky On 6/9/06, Dave Newton <[EMAIL PROTECTED]> wrote: Shshank Jain wrote: > Thanks in advance. Still OT, but anyway. Can't read your code. I'd still check to see if you're using a single-instance of an unsynchronized variable so it's gett

Re: [OT] Re: Encryption / decryption problem in multi threading

2006-06-09 Thread Dave Newton
Shshank Jain wrote: > Thanks in advance. Still OT, but anyway. Can't read your code. I'd still check to see if you're using a single-instance of an unsynchronized variable so it's getting corrupted when being hit by multiple threads. Dave --

Re: [OT] Re: Encryption / decryption problem in multi threading

2006-06-09 Thread Shshank Jain
i have made a static instance of it in the services and do it at that level..here is the code - code static { try { // theBigSecret : contains the 128 bit encrption key // ENCRYPTION_ALGORITHM : "AES" SecretK

[OT] Re: Encryption / decryption problem in multi threading

2006-06-09 Thread Dave Newton
Shshank Jain wrote: > any ideas ?? Not without any code. If you're doing it inside a Struts Action are you using an instance variable in the Action? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-

Encryption / decryption problem in multi threading

2006-06-09 Thread Shshank Jain
Hii I m having this strange problem. I m encrypting the password using java JCE AES encryption algorithm and storing the password as varchar(30) in the mySQL database. The Encryption/Decryption is working fine if i am doing it sequentially (single thread) but i m getting a javax.crypto.BadPaddi