=head1 NAME

dicepwgen - A diceware password generator

=head1 SYNOPSIS

    Usage: dice [-tcfvhd]
    Options:
    -t --humantoss            Asks interactively for rolled dices
    -c --wordcount <count>    Number of words (default: 4)
    -f --dictfile <dictfile>  Dictionary file to use (default:
                              /usr/share/dict/american-english)
    -l --minlen <count>       Minimum word len (default: 5)
    -m --maxlen <count>       Maximum word len (default: 10)
    -n --dontjump             Use all words in the dict file, e.g.
                              if it is an original diceware list
    -y --symbols              Replace space with -, add non-letters
    -d --debug                Enable debug output
    -v --version              Print program version
    -h -? --help              Print this help screen

=head1 DESCRIPTION

dicepwgen generates a diceware password using a dictionary
file. By default it uses pseudo random dice tosses, but
it is also possible to use real dices and enter the numbers
by using the option B<-t>, which is the most secure way
to generate diceware passwords.

The option B<-c> can be used to tweak the number of words
to output. The options B<-l> and B<-m> can be used to tweak
minimum and maximum word length.

You can tell dicepwgen to use another dictionary file with
the option B<-f>.

If you're using a precomputed diceware list, use the parameter
B<-n>, in which case dicepwgen will use all entries in the file.

The program only uses words which contain 7bit ASCII letters
(a-zA-Z0-9), which are easier for password usage anyway. However,
some sites have so called "password policies" applied and do
not support whitespaces and/or require special symbols to be
part of the password. Use -y in such cases which uses - as
word separator and adds %8 to the end of the password.

=head1 FILES

B</usr/share/dict/american-english>: default dictionary file.

You can use almost any dictionary file you want. Dicepwgen expects
the file to be in the following format: one word per line.

You can also use precomputed diceware word lists by adding the
option B<-n> to the commandline. If the file already contains
numbers, you have to remove them before using. Say, the file
looks like this:

 11126   abase
 11131   abash
 11132   abate
 11133   abbas

Prepare the file with this shell oneliner:

 grep "^[0-9]" dicewarelist.txt | awk '{print $2}' >> newlist.txt

=head1 SEE ALSO

L<http://world.std.com/~reinhold/diceware.html>

L<https://xkcd.com/936/>.

=head1 BUGS

In order to report a bug, unexpected behavior, feature requests
or to submit a patch, please open an issue on github:
L<https://github.com/TLINDEN/diceware/issues>.

Current known issues:

=over

=item *

The program does not count the lines in a dictionary file before
using it. If the file contains a low number of entries (e.g. because
it is a precomputed diceware word list and B<-n> has not been
specified), it seems to "hang". In fact it runs very long because it
jumps over a random number of entries and restarts from the beginning
again and again til the required number of words has been collected (7776).

=back

=head1 LICENSE

This software is licensed under the GNU GENERAL PUBLIC LICENSE version 3.

Copyright (c) 2015-2016 by T. v. Dein.

=head1 AUTHORS

T.v.Dein B<tom AT vondein DOT org>

=cut
