How to fill byte array with junk?
- by flyout
I am using this:
byte[] buffer = new byte[10240];
As I understand this initialize the buffer array of 10kb filled with 0s.
Whats the fastest way to fill this array (or initialize it) with junk data every time?
I need to use that array like 5000 times and fill it every time with different junk data, that's why I am looking for a fast method to do it. The array size will also have to change every time.