code: public static String generateKey() {
  		byte[] bytes = new byte[32];
  		getRandom().nextBytes(bytes);
  		char[] chars = new char[64];
  		for(int c=0;c<32;c++) {
  			byte b = bytes[c];
  			chars[c*2]=hexChars[(b&255)>>>4];
  			chars[c*2+1]=hexChars[b&15];
  		}
  		return new String(chars);
  	}
docs: Generates a random key.