Skip to content

npp_random

Jurek Muszyński edited this page Mar 31, 2022 · 2 revisions

char *npp_random(size_t len)

Description

Generates random, NULL-terminated string of len length. The string will consist of lower- and upper-case letters and digits, i.e. d7Hdp5N4eSon9alWm1yK.

Returns

Returns pointer to converted, zero-terminated static string.

Example

char key[32];
strcpy(key, npp_random(30));
Clone this wiki locally