|
myMPD
Internal API documentation
|
Random number generator functions based on OpenSSL. More...
#include <inttypes.h>#include <stddef.h>

Go to the source code of this file.
Functions | |
| unsigned | randrange (unsigned lower, unsigned upper) |
| char | randchar (void) |
| void | randstring (char *buffer, size_t len) |
Random number generator functions based on OpenSSL.
| char randchar | ( | void | ) |
Returns a random ascii char
| unsigned randrange | ( | unsigned | lower, |
| unsigned | upper | ||
| ) |
Generates an unsigned type random number in range (inclusive lower and exclusive upper bound)
| lower | lower boundary |
| upper | upper boundary |
| void randstring | ( | char * | buffer, |
| size_t | len | ||
| ) |
Fills the buffer with random ascii chars and NULL-terminates it.
| buffer | buffer to fill |
| len | length of buffer |