Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

crypt::passwdmd5(3) [centos man page]

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

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 UTF-8 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. Mun~oz <luismunoz@cpan.org> SEE ALSO
perl(1). POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 214: Non-ASCII character seen before =encoding in 'Mun~oz'. Assuming UTF-8 perl v5.16.3 2014-06-09 PasswdMD5(3)

Check Out this Related Man Page

md5crypt(n)						   MD5-based password encryption					       md5crypt(n)

__________________________________________________________________________________________________________________________________________________

NAME
md5crypt - MD5-based password encryption SYNOPSIS
package require Tcl 8.2 package require md5 2.0 package require md5crypt ?1.1.0? ::md5crypt::md5crypt password salt ::md5crypt::aprcrypt password salt ::md5crypt::salt ?length? _________________________________________________________________ DESCRIPTION
This package provides an implementation of the MD5-crypt password encryption algorithm as pioneered by FreeBSD and currently in use as a replacement for the unix crypt(3) function in many modern systems. An implementation of the closely related Apache MD5-crypt is also avail- able. The output of these commands are compatible with the BSD and OpenSSL implementation of md5crypt and the Apache 2 htpasswd program. COMMANDS
::md5crypt::md5crypt password salt Generate a BSD compatible md5-encoded password hash from the plaintext password and a random salt (see SALT). ::md5crypt::aprcrypt password salt Generate an Apache compatible md5-encoded password hash from the plaintext password and a random salt (see SALT). ::md5crypt::salt ?length? Generate a random salt string suitable for use with the md5crypt and aprcrypt commands. SALT
The salt passed to either of the encryption schemes implemented here is checked to see if it begins with the encryption scheme magic string (either "$1$" for MD5-crypt or "$apr1$" for Apache crypt). If so, this is removed. The remaining characters up to the next $ and up to a maximum of 8 characters are then used as the salt. The salt text should probably be restricted the set of ASCII alphanumeric characters plus "./" (dot and forward-slash) - this is to preserve maximum compatability with the unix password file format. If a password is being generated rather than checked from a password file then the salt command may be used to generate a random salt. EXAMPLES
% md5crypt::md5crypt password 01234567 $1$01234567$b5lh2mHyD2PdJjFfALlEz1 % md5crypt::aprcrypt password 01234567 $apr1$01234567$IXBaQywhAhc0d75ZbaSDp/ % md5crypt::md5crypt password [md5crypt::salt] $1$dFmvyRmO$T.V3OmzqeEf3hqJp2WFcb. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category md5crypt of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. SEE ALSO
md5 KEYWORDS
hashing, md5, md5crypt, message-digest, security COPYRIGHT
Copyright (c) 2003, Pat Thoyts <patthoyts@users.sourceforge.net> md5crypt 1.1.0 md5crypt(n)
Man Page