package io.tetrapod.core.utils;


import java.security.SecureRandom;
import java.util.Random;

public class Rand {
  
   private static Random r = new SecureRandom();
   
   public static int nextInt() {
      return r.nextInt();
   }

   public static int nextInt(int max) {
      return r.nextInt(max);
   }

   public static String nextBase36String(int numDigits) {
      StringBuilder sb = new StringBuilder();
      String digits = "0123456789abcdefghijklmnopqrstuvwxyz";
      for (int i=0; i<numDigits; i++) {
         sb.append(digits.charAt(nextInt(36)));
      }
      return sb.toString();
   }
}

@@ -598,11 +598,140 @@
 ();%0A   %7D
+%0A%0A   public static byte%5B%5D bytes(int len) %7B%0A      byte%5B%5D bytes = new byte%5Blen%5D;%0A      r.nextBytes(bytes);%0A      return bytes;%0A   %7D
 %0A%7D%0A

add ability to generate random byte arrays