public final class NanoIdUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static char[] |
DEFAULT_ALPHABET
The default alphabet used by this class.
|
static SecureRandom |
DEFAULT_NUMBER_GENERATOR
The default random number generator used by this class.
|
static int |
DEFAULT_SIZE
The default size used by this class.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
randomNanoId()
Static factory to retrieve a url-friendly, pseudo randomly generated, NanoId String.
|
static String |
randomNanoId(Random random,
char[] alphabet,
int size)
Static factory to retrieve a NanoId String.
|
public static final SecureRandom DEFAULT_NUMBER_GENERATOR
public static final char[] DEFAULT_ALPHABET
public static final int DEFAULT_SIZE
public static String randomNanoId()
public static String randomNanoId(Random random, char[] alphabet, int size)
random - The random number generator.alphabet - The symbols used in the NanoId String.size - The number of symbols in the NanoId String.Copyright © 2017–2018 Aventrix. All rights reserved.