Java SecureRandom.getSeed(int numBytes)

Syntax

SecureRandom.getSeed(int numBytes) has the following syntax.

public static byte[] getSeed(int numBytes)

Example

In the following code shows how to use SecureRandom.getSeed(int numBytes) method.


//w w  w.  j a va2 s .c  o m
import java.security.SecureRandom;
import java.util.Arrays;

public class Main {
  public static void main(String[] argv) throws Exception {

    System.out.println(Arrays.toString(SecureRandom.getSeed(8)));
  }
}




















Home »
  Java Tutorial »
    java.security »




SecureRandom