summaryrefslogtreecommitdiff
path: root/src/librandom/random_name.c
blob: bba133142854a32a92ad485a2ad7900c039f34ee (plain)
1
2
3
4
5
6
7
8
9
10
/* ISC license. */

#include <skalibs/random.h>

void random_name (char *s, size_t n)
{
  static char const oklist[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZghijklmnopqrstuvwxyz-_0123456789abcdef" ;
  random_string(s, n) ;
  while (n--) s[n] = oklist[s[n] & 63] ;
}