NAME
Data::SimplePassword - Simple random password generator
SYNOPSIS
use Data::SimplePassword;
my $sp = Data::SimplePassword->new;
$sp->chars( 0..9, 'a'..'z', 'A'..'Z' ); # optional
my $password = $sp->make_password( 8 ); # length
DESCRIPTION
YA very easy-to-use but a bit strong random password generator.
METHODS
- new
-
my $sp = Data::SimplePassword->new;
Makes a Data::SimplePassword object.
- chars
-
$sp->chars( 0..9, 'a'..'z', 'A'..'Z' ); # default $sp->chars( 0..9, 'a'..'z', 'A'..'Z', qw(+ /) ); # b64-like $sp->chars( 0..9 ); my @c = $sp->chars; # returns the current values
Sets an array of characters you want to use as your password string.
- make_password
-
my $password = $sp->make_password( 8 ); # default my $password = $sp->make_password( 1024 );
Makes password string and just returns it. You can set the byte length as an integer.
DEPENDENCY
CLASS, Class::Accessor, Class::Data::Inheritable, Crypt::Random, Math::Random::MT (or Math::Random::MT::Perl), UNIVERSAL::require
SEE ALSO
Crypt::GeneratePassword, Crypt::RandPasswd, Data::RandomPass, String::MkPasswd, Data::Random::String
AUTHOR
Ryo Okamoto <ryo at aquahill dot net>
COPYRIGHT & LICENSE
Copyright 2006-2008 Ryo Okamoto, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.