The generateSeed() method is used to generate a given number of seed bytes. These seed bytes are computed using the seed generation algorithm. This method is from the SecureRandom class, which consists of methods to generate strong random numbers.
secureRandomInstnace.generateSeed(number_of_bytes)
This method takes the number_of_bytes as a parameter.
It returns an array of seed bytes.
import java.security.*;import java.util.*;public class main {public static void main(String[] argv){//create instance of securerandomSecureRandom rndm = new SecureRandom();//get seed bytesbyte bytes[] = rndm.generateSeed(15);//display the seed bytes arraySystem.out.println(Arrays.toString(bytes));}}
SecureRandom class and assign it to variable, rndm.generateSeed() method, which we call on the rndm instance.bytes.Free Resources