random_buf(3)
limb manual
random_buf(3)
NAME
random_buf, random_name
SYNOPSIS
#include <limb/random.h>
void random_buf(char *dst, size_t dlen) void random_name(char *dst, size_t dlen)
DESCRIPTION
The random_buf
() function will write dlen
bytes of pseudo-random data into
the memory pointed by dst
.
The random_name
() macro is similar to random_buf
() except it will ensure all
written bytes are actually ASCII printable characters, thus forming a valid file
name (that won't contain any slashes (/
) nor dots (.
)).