generateKey() hangs on FreeBSD
843810Aug 4 2004 — edited Aug 9 2004Hi 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?