Here you can find the source of randomBytes(byte[] bytes)
Parameter | Description |
---|---|
bytes | the target array |
public static void randomBytes(byte[] bytes)
//package com.java2s; //License from project: Apache License import java.util.Random; public class Main { private static final Random RANDOM = new Random(); /**// www.j a va 2 s . c o m * Get a number of pseudo random bytes. * * @param bytes the target array */ public static void randomBytes(byte[] bytes) { RANDOM.nextBytes(bytes); } }