1md5crypt(n)              MD5-based password encryption             md5crypt(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       md5crypt - MD5-based password encryption
9

SYNOPSIS

11       package require Tcl  8.2
12
13       package require md5  2.0
14
15       package require md5crypt  ?1.1.0?
16
17       ::md5crypt::md5crypt password salt
18
19       ::md5crypt::aprcrypt password salt
20
21       ::md5crypt::salt ?length?
22
23_________________________________________________________________
24

DESCRIPTION

26       This  package  provides  an  implementation  of  the MD5-crypt password
27       encryption algorithm as pioneered by FreeBSD and currently in use as  a
28       replacement  for  the unix crypt(3) function in many modern systems. An
29       implementation of the closely related Apache MD5-crypt is  also  avail‐
30       able.   The  output  of  these commands are compatible with the BSD and
31       OpenSSL implementation of md5crypt and the Apache 2 htpasswd program.
32

COMMANDS

34       ::md5crypt::md5crypt password salt
35              Generate a BSD compatible md5-encoded  password  hash  from  the
36              plaintext password and a random salt (see SALT).
37
38       ::md5crypt::aprcrypt password salt
39              Generate an Apache compatible md5-encoded password hash from the
40              plaintext password and a random salt (see SALT).
41
42       ::md5crypt::salt ?length?
43              Generate a random salt string suitable for use with the md5crypt
44              and aprcrypt commands.
45

SALT

47       The salt passed to either of the encryption schemes implemented here is
48       checked to see if it begins with the  encryption  scheme  magic  string
49       (either  "$1$" for MD5-crypt or "$apr1$" for Apache crypt). If so, this
50       is removed. The remaining characters up to the next $ and up to a maxi‐
51       mum  of  8  characters  are then used as the salt. The salt text should
52       probably be restricted the set of ASCII  alphanumeric  characters  plus
53       "./"  (dot and forward-slash) - this is to preserve maximum compatabil‐
54       ity with the unix password file format.
55
56       If a password is being generated rather than checked  from  a  password
57       file then the salt command may be used to generate a random salt.
58

EXAMPLES

60       % md5crypt::md5crypt password 01234567
61       $1$01234567$b5lh2mHyD2PdJjFfALlEz1
62
63
64       % md5crypt::aprcrypt password 01234567
65       $apr1$01234567$IXBaQywhAhc0d75ZbaSDp/
66
67
68       % md5crypt::md5crypt password [md5crypt::salt]
69       $1$dFmvyRmO$T.V3OmzqeEf3hqJp2WFcb.
70
71

BUGS, IDEAS, FEEDBACK

73       This  document,  and the package it describes, will undoubtedly contain
74       bugs and other problems.  Please report such in the  category  md5crypt
75       of       the       Tcllib       SF       Trackers       [http://source
76       forge.net/tracker/?group_id=12883].  Please also report any  ideas  for
77       enhancements you may have for either package and/or documentation.
78

SEE ALSO

80       md5
81

KEYWORDS

83       hashing, md5, md5crypt, message-digest, security
84
86       Copyright (c) 2003, Pat Thoyts <patthoyts@users.sourceforge.net>
87
88
89
90
91md5crypt                             1.1.0                         md5crypt(n)
Impressum