*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> randomchars (3)              
Title
Content
Arch
Section
 

randomword(3)

Contents


NAME    [Toc]    [Back]

       randomword,  randomchars,  randomletters - Generate random
       passwords (Enhanced Security)

SYNOPSIS    [Toc]    [Back]

       int randomchars(
               char *string,
               unsigned short int minlen,
               unsigned short int maxlen,
               boolean restrict,
               long seed ); int randomletters(
               char *string,
               unsigned short int minlen,
               unsigned short int maxlen,
               boolean restrict,
               long seed ); int randomword(
               char *word,
               char *hyphenated_word,
               unsigned short int minlen,
               unsigned short int maxlen,
               boolean restrict,
               long seed );

LIBRARY    [Toc]    [Back]

       Enhanced Security Library (libsecurity)

PARAMETERS    [Toc]    [Back]

       Points at a user-supplied space to contain  a  null-terminated
  password.  Specifies the minimum length that a generated
 word can have.  Specifies the maximum length that a
       generated  word  can have.  Specifies whether restrictions
       are to be imposed on the generated word. This is a boolean
       integer, where a non-zero integer indications restrictions
       and a 0 (zero) indicates no  restrictions.   Specifies  an
       initial seed for the random number generator.  Points at a
       user-supplied space to contain  a  null-terminated  random
       pronounceable  password.   Contains the hyphenated version
       of the generated word.

DESCRIPTION    [Toc]    [Back]

       These functions generate random passwords for use in password
  selection.  All of them are generated by the system,
       based on seeds and set in the function. Such seeds can  be
       created with the drand48(), rand(), or random() functions.

       The randomchars() function places a null-terminated  password
  composed  of  random printable ASCII characters into
       the string parameter and returns the length of the  generated
  string.  The minlen and maxlen parameters denote the
       minimum and  maximum  lengths  allowed  for  string.   The
       minlen  parameter  can equal maxlen, but cannot be greater
       than maxlen, and cannot be negative.  The user space  preallocated
  is  at  least  maxlen  for string.  The smaller
       minlen and maxlen are, the smaller the selection space  of
       random words.

       The  restrict  parameter  is 0 (zero) when no restrictions
       are placed on the generated word. It is nonzero  when  the
       words  generated  pass  the  tests of the acceptable_password()
 function. The seed argument  specifies  an  initial
       seed  for  the  random  number  generator  used by randomchars().


       The seed parameter is used by the  function  only  on  the
       first  time it is called; the parameter is ignored on subsequent
 calls.

       The  randomletters()  function  places  a  null-terminated
       password  composed  of  random lower-case letters into the
       string parameter and returns the length of  the  generated
       word.  The  minlen,  maxlen, restrict, and seed parameters
       are the same as for the randomchars() function.

       The randomword() function places a null-terminated  random
       pronounceable password into the word parameter and returns
       the length of the generated word. The  hyphenated  version
       of  the  word  is  placed  in hyphenated_word. The minlen,
       maxlen, restrict, and seed parameters are the same as  for
       the  randomchars() and randomletters() functions. The user
       space preallocated is at  least  2*max  -  1  for  hyphenated_word.

NOTES    [Toc]    [Back]

       The password generator relies on a random number generator
       that produces uniformly distributed integers. Because  the
       password  generator  invokes  the  random number generator
       many times even for one word, the random number  generator
       has  to  produce  a uniform distribution. The period (distinct
 numbers produced given a particular seed) and number
       space  (range of possible numbers) must both be large. The
       drand48() functions are used for this purpose.

       Programs using these functions must be compiled with -lsecurity.

FILES    [Toc]    [Back]

       System password file.  System group file.

SEE ALSO    [Toc]    [Back]

      
      
       Commands: login(1), passwd(1)

       Functions:  acceptable_password(3),  drand48(3),  rand(3),
       random(3)



                                                    randomword(3)
[ Back ]
 Similar pages
Name OS Title
db_archive Tru64 displays security database log files no longer involved in active transactions (Enhanced Security)
secsetup Tru64 Security features setup graphical interface (Enhanced Security)
secconfig Tru64 Security features setup graphical interface (Enhanced Security)
db_dump185 Tru64 Reads and writes the security databases (Enhanced Security)
db_checkpoint Tru64 Periodically checkpoint the security database log (Enhanced Security)
db_dump Tru64 Reads and writes the security databases (Enhanced Security)
authcap Tru64 Format of security databases (Enhanced Security)
RAND_pseudo_bytes Tru64 Generate random data
RAND_bytes Tru64 Generate random data
RAND_pseudo_bytes OpenBSD generate random data
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service