Example #1
0
        public static T[] Shuffle <T>(this T[] source, int index, int length)
        {
            T[]    sorted  = new T[source.Length];
            byte[] randoms = new byte[sorted.Length];

            source.CopyTo(sorted, 0);

            RandomImpl.NextBytes(randoms);
            Array.Sort(randoms, sorted, index, length);

            return(sorted);
        }
Example #2
0
 public static void RandomBytes(byte[] buffer)
 {
     RandomImpl.NextBytes(buffer);
 }