Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem encrypting with VB .NET and decrypting with Java

843811Jul 20 2006 — edited Nov 30 2006
Howdy All,

I'm hoping someone out there could shed some light on a problem I'm having.

I'm encrypting a password with Visual Basic .NET's Security Assemblies using DES/ECB/NoPadding. I encrypt the password with a hardcoded key on the .NET side.

I then send the encrypted string to a Java application through a TCP/IP Connection. The Java Application then uses the same Hardcoded key and attempts to decrypt it using DES/ECB/NoPadding. I do not receive any exceptions, but the encryption is not properly decrypted. Actually, the two are not even close.

I can encrypt on the Java and then decrypt as many internet examples provide. I can do this on the VB .NET side as well. However, it will not work when the VB side encrypts and Java decrypts.

Does anyone have any ideas that may help? I would post the source code, but I don't think it's the problem because the encryption and decryption will work if done on the same side. I think it's a difference in the way byte arrays, strings, etc... are handled between the two.

Any help given would be much appreciated.

Thanks,
Josh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 28 2006
Added on Jul 20 2006
9 comments
1,122 views