|
Get random numbers/bytes.
This function read random numbers/bytes from /dev/urandom and stort this bytes in a buffer. -
Parameters:
-
buf |
(char *) in which the bytes will be stored. If this parameter is equal to NULL dynamic memory will be allocated. |
size |
an integer, specifies ths size of the buffer (the number of the random bytes). WARNING: If buf is not equal to null, n*(size) bytes will be stored in this buffer without any check of ths size of this buf. |
-
Returns:
-
(char *) a pointer to the buffer in which the random bytes are stored.
|