How can I create an array of 20 random bytes in Java?
Try the Random.nextBytes method:
Random.nextBytes
byte[] b = new byte[20]; new Random().nextBytes(b);
548k questions
547k answers
4 comments
86.3k users