Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

block_random.c File Reference

Part of libcomm: contains block_random(). More...

#include <stdio.h>
#include <stdlib.h>

Functions

char * block_random (char *buf, int size)
 Get random numbers/bytes. More...


Detailed Description

Part of libcomm: contains block_random().


Function Documentation

char* block_random char *    buf,
int    size
 

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.


Generated on Thu Feb 17 10:17:22 2005 for FinalYearProject,A.Hofmeier:CommunicationLibrary by doxygen1.2.15