blob: 83b162656b42a214b2b83ac3549850924a994bd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/* ISC license. */
/* MT-unsafe */
#include <skalibs/random.h>
void random_name (char *s, unsigned int n)
{
static char const oklist[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZghijklmnopqrstuvwxyz-_0123456789abcdef" ;
random_string(s, n) ;
while (n--) s[n] = oklist[s[n] & 63] ;
}
|