+ return generateId(DEFAULT_LENGTH);
+ }
+
+ /**
+ * Generates a new random ID, consisting of <code>length</code> random
+ * bytes.
+ *
+ * @param length
+ * The length of the ID in bytes before conversion to a string
+ * @return The new ID
+ */
+ public static byte[] generateId(int length) {
+ byte[] idBytes = new byte[length];