Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

crypt::passwdmd5(3pm) [debian man page]

PasswdMD5(3pm)						User Contributed Perl Documentation					    PasswdMD5(3pm)

NAME
Crypt::PasswdMD5 - Provides interoperable MD5-based crypt() functions SYNOPSIS
use Crypt::PasswdMD5; $cryptedpassword = unix_md5_crypt($password, $salt); $apachepassword = apache_md5_crypt($password, $salt); DESCRIPTION
the "unix_md5_crypt()" provides a crypt()-compatible interface to the rather new MD5-based crypt() function found in modern operating systems. It's based on the implementation found on FreeBSD 2.2.[56]-RELEASE and contains the following license in it: "THE BEER-WARE LICENSE" (Revision 42): <phk@login.dknet.dk> wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp "apache_md5_crypt()" provides a function compatible with Apache's ".htpasswd" files. This was contributed by Bryan Hart <bryan@eai.com>. As suggested by William A. Rowe, Jr. <wrowe@lnd.com>, it is exported by default. For both functions, if a salt value is not supplied, a random salt will be generated. Contributed by John Peacock <jpeacock@cpan.org>. EXPORT None by default. HISTORY
$Id: PasswdMD5.pm,v 1.3 2004/02/17 11:21:38 lem Exp $ 19980710 luismunoz@cpan.org: Initial release 19990402 bryan@eai.com: Added apache_md5_crypt to create a valid hash for use in .htpasswd files 20001006 wrowe@lnd.com: Requested apache_md5_crypt to be exported by default. 20010706 luismunoz@cpan.org: Use Digest::MD5 instead of the (obsolete) MD5. $Log: PasswdMD5.pm,v $ Revision 1.3 2004/02/17 11:21:38 lem Modified the POD so that ABSTRACT can work Added usage example for apache_md5_crypt() Revision 1.2 2004/02/17 11:04:35 lem Added patch for random salts from John Peacock (Thanks John!) De-MS-DOS-ified the file Replaced some '' with q// to make Emacs color highlighting happy Added CVS docs Completed the missing sections of the POD documentation Changed my email address to the Perl-related one for consistency The file is now encoded in ISO-8859-1 LICENSE AND WARRANTY
This code and all accompanying software comes with NO WARRANTY. You use it at your own risk. This code and all accompanying software can be used freely under the same terms as Perl itself. AUTHOR
Luis E. Mu[ntilde]oz <luismunoz@cpan.org> SEE ALSO
perl(1). perl v5.12.4 2011-08-30 PasswdMD5(3pm)

Check Out this Related Man Page

PASSWD(1SSL)							      OpenSSL							      PASSWD(1SSL)

NAME
openssl-passwd, passwd - compute password hashes SYNOPSIS
openssl passwd [-help] [-crypt] [-1] [-apr1] [-aixmd5] [-5] [-6] [-salt string] [-in file] [-stdin] [-noverify] [-quiet] [-table] [-rand file...] [-writerand file] {password} DESCRIPTION
The passwd command computes the hash of a password typed at run-time or the hash of each password in a list. The password list is taken from the named file for option -in file, from stdin for option -stdin, or from the command line, or from the terminal otherwise. The Unix standard algorithm crypt and the MD5-based BSD password algorithm 1, its Apache variant apr1, and its AIX variant are available. OPTIONS
-help Print out a usage message. -crypt Use the crypt algorithm (default). -1 Use the MD5 based BSD password algorithm 1. -apr1 Use the apr1 algorithm (Apache variant of the BSD algorithm). -aixmd5 Use the AIX MD5 algorithm (AIX variant of the BSD algorithm). -5 -6 Use the SHA256 / SHA512 based algorithms defined by Ulrich Drepper. See <https://www.akkadia.org/drepper/SHA-crypt.txt>. -salt string Use the specified salt. When reading a password from the terminal, this implies -noverify. -in file Read passwords from file. -stdin Read passwords from stdin. -noverify Don't verify when reading a password from the terminal. -quiet Don't output warnings when passwords given at the command line are truncated. -table In the output list, prepend the cleartext password and a TAB character to each password hash. -rand file... A file or files containing random data used to seed the random number generator. Multiple files can be specified separated by an OS- dependent character. The separator is ; for MS-Windows, , for OpenVMS, and : for all others. [-writerand file] Writes random data to the specified file upon exit. This can be used with a subsequent -rand flag. EXAMPLES
% openssl passwd -crypt -salt xx password xxj31ZMTZzkVA % openssl passwd -1 -salt xxxxxxxx password $1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a. % openssl passwd -apr1 -salt xxxxxxxx password $apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0 % openssl passwd -aixmd5 -salt xxxxxxxx password xxxxxxxx$8Oaipk/GPKhC64w/YVeFD/ COPYRIGHT
Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>. 1.1.1a 2018-12-18 PASSWD(1SSL)
Man Page