I need Long Security ID

Hi, I have jdk1.4. and I need to generate unique long ID for each client which will be transported from server to client and vise versa . As I see, J2SE has the next classes which may be useful to me: Random and SecureRandom.

What and why is better to use? Maybe it is better use another class or maybe external library? May you give me an advise. May you also give a link to specific article if you know. Thank you in advance.

[440 byte] By [dbes@isd.dp.uaa] at [2007-11-26 20:05:39]
# 1

SecureRandom is slower and non-deterministic. The speed often doesn't matter at all and the non-determinismus may be what you want.

Random is quite simple - if you suppose somebody trying to guess the IDs, than do not use Random.

Explain your needs in more detail, tell us if you need deteminismus or not.

Maaartina at 2007-7-9 23:06:45 > top of Java-index,Security,Cryptography...