Secure Password Generator in Perl

A secure and very random password generator module written in Perl.
It can be used to generate passwords or unique strings which can be used in sorts of operations.

The default character set is alpha-numerical based, but can be set to any kind of character list.

The complete handling and generating is implemented in a module, which exports one function: ‘generate_password’.
This function can take (optional) as arguments:

  • a length
  • a character list

The entropy is generated with Bytes::Random::Secure and random numbers are generated with Math::Random::ISAAC.

Example script:




Secure Password Generator in Perl — 1 Comment

  1. Uses a homebrown random function which in turn uses rand() which is not cryptographically secure. Are you a cryptographer? Why reinvent the wheel?
    Why not use a known good function, one of those recommended in the documentation of the rand() function?
    Alternatively, use /dev/urandom.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.