This function is used to create a frequency table to be used later
by passgen. This routine is run during the initial install of the
module so that at least one frequency table is available.
This function reads a file and for each word that is found (ignoring any with non-alphabet characters) notes the starting letter, the second letter and each combination of 3 letters. Once the file is read the resultant arrays then contain the relative occurence of each letter combination. The frequency table will vary depending on the language of the input file.
The input hash can contain keys DICT, FILE and APPEND with the above defaults. All arguments are optional. If APPEND is true the frequency table from the input dictionary will be appended to an existing table (if it exists).
Returns 1 if successful and 0 otherwise. On error, the reason is stored in $Crypt::PassGen::ERRSTR.
A default frequency file is provided for passgen as part of the installation. This routine is only required to either extend or replace the default value.
Generate a password.
Argument is a hash with the following keys:
An array of passwords is returned. An empty list is returned if an error occurs (and $Crypt::PassGen::ERRSTR is set to the reason).
All routines in this module store errors in the ERRSTR variable. This variable can be accessed if the routines return an error state and contains the reason for the error.
@words = passgen( NLETT => 2 ) or die "Error message: $Crypt::PassGen::ERRSTR";
Tim Jenness <email@example.com> Copyright (C) 2000-2012 T. Jenness. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Based on the PASSGEN program written by Mike Bartman of SAR, Inc as part of the SPAN security toolkit.
|perl v5.20.3||PASSGEN (3)||2012-09-21|