Welcome to little lamb

Code » limb » release » tree

[release] / src / doc / random.h / random_buf.3.md

% limb manual
% random_buf(3)
% limb 0.1.0
% 2023-07-24

# NAME

random_buf, random_name

# SYNOPSIS

    #include <limb/random.h>

```pre hl
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 (`.`)).