This discussion is archived
4 Replies Latest reply: Feb 23, 2010 5:01 AM by 800268 RSS

understandin security random number generator

807580 Newbie
Currently Being Moderated
Hi all,

I was willing to generate a secure random number using the SecureRandom Class rather than random. Now I am getting the concept here as which one is the random number.
The code I am using from java site is below:

class Test{
public static void main(String[] args){

      SecureRandom random = new SecureRandom();
      byte bytes[] = new byte[20];

        for ( int i=0;i <bytes.length; i++)
Now it prints a series of numbers like 
Now is the whole thing a random number? why there is a dash (-) between the numbers?
All I need is just a random number using securerandom class.

Thanks in advance.