OpenSMTPD::Password - Perl extension for creating password hashes
To install this module type the following:
perl Makefile.PL make make test make install
This module requires these other modules and libraries:
BSD::arc4random
Tests require:
OpenSMTPD's `smtpctl encrypt` command
use OpenSMTPD::Password qw/newhash checkhash/; my $hash = newhash($password); if (checkhash($password, $hash)) { do_cool_stuff(); }
Simple module for creating and verifying password hashes for OpenSMTPD.
newhash
Returns a hash of the password suitable for use with smtpd(8)
checkhash
Returns a true value if the plaintext password matches the provided hash.
Perl version of the encrypt program included with OpenSMTPD portable by Sunil Nimmagadda and Gilles Chehade.
None by default.
smtpd(8)
Edgar Pettijohn, <edgar@pettijohn-web.com>
Copyright (C) 2020 by Edgar Pettijohn
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
To install OpenSMTPD::Password, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenSMTPD::Password
CPAN shell
perl -MCPAN -e shell install OpenSMTPD::Password
For more information on module installation, please visit the detailed CPAN module installation guide.