The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

OpenSMTPD::Password - Perl extension for creating password hashes

INSTALLATION

To install this module type the following:

  perl Makefile.PL
  make
  make test
  make install

DEPENDENCIES

This module requires these other modules and libraries:

  BSD::arc4random

Tests require:

  OpenSMTPD's `smtpctl encrypt` command

SYNOPSIS

  use OpenSMTPD::Password qw/newhash checkhash/;

  my $hash = newhash($password);

  if (checkhash($password, $hash)) {
        do_cool_stuff();
  }

DESCRIPTION

Simple module for creating and verifying password hashes for OpenSMTPD.

Subroutines

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.

ACKNOWLEDGEMENTS

Perl version of the encrypt program included with OpenSMTPD portable by Sunil Nimmagadda and Gilles Chehade.

EXPORT

None by default.

SEE ALSO

smtpd(8)

AUTHOR

Edgar Pettijohn, <edgar@pettijohn-web.com>

COPYRIGHT AND LICENSE

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.