![]() |
DDraceNetwork Documentation
|
Functions | |
| void | generate_password (char *buffer, unsigned length, const unsigned short *random, unsigned random_length) |
| void | secure_random_password (char *buffer, unsigned length, unsigned pw_length) |
| void | secure_random_fill (void *bytes, unsigned length) |
| int | secure_rand_below (int below) |
Secure random number generation.
| void generate_password | ( | char * | buffer, |
| unsigned | length, | ||
| const unsigned short * | random, | ||
| unsigned | random_length ) |
Generates a null-terminated password of length 2 * random_length.
| buffer | Pointer to the start of the output buffer. |
| length | Length of the buffer. |
| random | Pointer to a randomly-initialized array of shorts. |
| random_length | Length of the short array. |
| int secure_rand_below | ( | int | below | ) |
Returns a random nonnegative integer below the given number, with a uniform distribution.
| below | Upper limit (exclusive) of integers to return. |
| void secure_random_fill | ( | void * | bytes, |
| unsigned | length ) |
Fills the buffer with the specified amount of random bytes.
| bytes | Pointer to the start of the buffer. |
| length | Length of the buffer. |
| void secure_random_password | ( | char * | buffer, |
| unsigned | length, | ||
| unsigned | pw_length ) |
Fills the buffer with the specified amount of random password characters.
| buffer | Pointer to the start of the buffer. |
| length | Length of the buffer. |
| pw_length | Length of the desired password. |