]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/basic/NCSA/crypt_md5.h
2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
10 * Creates a MD5 based hash of a password
12 * To validate a entered password, use the previously calculated
13 * password hash as salt, and then compare the result. If identical
14 * then the password matches.
16 * While encoding a password the salt should be 8 randomly selected
17 * characters from the base64 alphabet, for example generated as follows:
19 * to64(salt, rand(), 4);
20 * to64(salt+4, rand(), 4);
26 char *crypt_md5(const char *pw
, const char *salt
);
28 /* MD5 hash without salt */
29 char *md5sum(const char *s
);
31 #endif /* _CRYPT_MD5_H */