Text::Password::SHA - generate and verify Password with SHA
my $pwd = Text::Password::SHA->new(); my( $raw, $hash ) = $pwd->generate(); # list context is required my $input = $req->body_parameters->{passwd}; my $data = $pwd->encrypt($input); # you don't have to care about salt my $flag = $pwd->verify( $input, $data );
Text::Password::SHA is the last part of Text::Password::AutoMigration.
No arguments are required. But you can set some arguments.
You can set other length to 'default' like below:
$pwd = Text::Password::AutoMiglation->new( default => 8 );
It must be a boolean, default is 1.
less readable characters(0Oo1Il|!2Zz5sS$6b9qCcKkUuVvWwXx.,:;~-^'"`) are forbidden while $self->readability is 1.
You can let passwords to be more secure with setting readablity =< 0.
Then you can generate stronger passwords with generate().
$pwd = Text::Password::AutoMiglation->new( readability => 0 );
# or $pwd->readability(0);
returns true if the verification succeeds.
generates the random strings with enough strength.
the length defaults to 10 || $self->default().
returns hash with unix_sha512_crypt().
salt will be made automatically.
generates pair of new password and its hash.
less readable characters(0Oo1Il|!2Zz5sS$6b9qCcKkUuVvWwXx.,:;~-^'"`) are forbidden unless $self->readability is 0.
Copyright (C) Yuki Yoshida(worthmine).
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Yuki Yoshida <worthmine@users.noreply.github.com>
To install Text::Password::AutoMigration, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Password::AutoMigration
CPAN shell
perl -MCPAN -e shell install Text::Password::AutoMigration
For more information on module installation, please visit the detailed CPAN module installation guide.