Skip to content

Instantly share code, notes, and snippets.

@drfloob
Last active October 25, 2016 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drfloob/634cf12244a10df11bc31aeed65e18f6 to your computer and use it in GitHub Desktop.
Save drfloob/634cf12244a10df11bc31aeed65e18f6 to your computer and use it in GitHub Desktop.
private static final char[] ALPHABET = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'0', 'a', 'b', 'c', 'd', 'e', 'f' };
private static final int LENGTH = 12;
public static String __MISSING_NAME__(final String s) {
final StringBuilder stringBuilder = new StringBuilder(s);
for (int i = 0; i < LENGTH; i++) {
stringBuilder.append(
ALPHABET[
(int) Math.floor(Math.random()
* (double) ALPHABET.length)]);
}
return stringBuilder.toString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment