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!

generateKey() hangs on FreeBSD

843810Aug 4 2004 — edited Aug 9 2004
Hi All,

I am using the following snippet of code to generate an encrypted string. This program works fine on Windows XP. But the same program hangs on FreeBSD version 4.9. The program hangs during call to 'gen.generateKey()' and does not proceed at all. There are no error messages as well. I have confirmed this by putting System.out.println() statements after every statement.

I am using JDK 1.4.2 with default SunJCE Provider. The size of jce.jar is 69596 bytes on both Windows and FreeBSD.

************************************************************************************
static String _encScheme = "DES";

Cipher c = Cipher.getInstance(_encScheme);

KeyGenerator gen = KeyGenerator.getInstance(_encScheme);

SecretKey sk = gen.generateKey();

c.init(Cipher.ENCRYPT_MODE, sk);

************************************************************************************

What could be the possible reason of this error?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 6 2004
Added on Aug 4 2004
3 comments
222 views