get_random_bytes man page on Tru64

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
Tru64 logo
[printable version]

get_random_bytes(9r)					  get_random_bytes(9r)

NAME
       get_random_bytes	 -  General:  Returns  the  requested number of random
       bytes and stores them in a buffer.

SYNOPSIS
       void get_random_bytes(
	       void *buf,
	       int nbytes );

ARGUMENTS
       Specifies the address of the buffer in which the requested random bytes
       are stored.  Specifies the number of random bytes.

DESCRIPTION
       The  get_random_bytes()	routine returns the requested number of random
       bytes and stores them in a buffer. This routine is for  kernel  modules
       that cannot be in a wait state.

RETURN VALUES
       Upon  successful completion, get_random_bytes() returns a buffer filled
       with random bytes.

       ************Fran, what does it return upon failure, efault?

EXAMPLE
       The following example shows how to use the  get_random_bytes()  routine
       to generate a random DCE UUID:

       unsigned	 char uuid[16]; get_random_bytes(uuid, sizeof (uuid)); uuid[6]
       = (uuid[6] & 0x0f) | 0x40;     /* UUID version 4 -- random  genmeration
       */ uuid[8] = (uuid[8] & 0x3f) | 0x80;	 /* UUID variant DCE */

       ************Fran, what does DCE UUID stand for?

SEE ALSO
       Routines: get_random_bytes_wait(9r)

       Files: random(4) and urandom(4)

							  get_random_bytes(9r)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Tru64

List of man pages available for Tru64

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net