[jcifs] SecureRandom.nextBytes Takes Too Long

Michael B Allen mba2000 at ioplex.com
Thu Sep 11 14:56:39 EST 2003


Eric,

The random.nextBytes(clientChallenge) calls in the NPA constructors kill
my CPU and takes almost 10 seconds to run. This make program startup
pretty painful. Any ideas?

Part of the thread dump during the wait period:

"main" prio=1 tid=0x804e248 nid=0x2aaf runnable [0xbfffc000..0xbfffd494]
        at
sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:169)
        at java.security.SecureRandom.nextBytes(SecureRandom.java:324)
        at
jcifs.smb.NtlmPasswordAuthentication.<init>(NtlmPasswordAuthentication.java:212)
        at
jcifs.smb.NtlmPasswordAuthentication.<clinit>(NtlmPasswordAuthentication.java:154)
        at jcifs.smb.SmbFile.<init>(SmbFile.java:480)
        at jcifs.smb.SmbFile.<init>(SmbFile.java:376)
        at Exists.main(Exists.java:7)

-- 
A program should be written to  model the concepts of the task it
performs rather than the physical world or a process because this
maximizes the  potential for it  to be applied  to tasks that are
conceptually similar and, more  important, to tasks that have not
yet been conceived.



More information about the jcifs mailing list