]> git.ipfire.org Git - thirdparty/squid.git/blob - src/auth/basic/NCSA/crypt_md5.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / auth / basic / NCSA / crypt_md5.h
1 /*
2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9 /*
10 * Creates a MD5 based hash of a password
11 *
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.
15 *
16 * While encoding a password the salt should be 8 randomly selected
17 * characters from the base64 alphabet, for example generated as follows:
18 * char salt[9];
19 * to64(salt, rand(), 4);
20 * to64(salt+4, rand(), 4);
21 * salt[0] = '\0';
22 */
23 #ifndef _CRYPT_MD5_H
24 #define _CRYPT_MD5_H
25
26 char *crypt_md5(const char *pw, const char *salt);
27
28 /* MD5 hash without salt */
29 char *md5sum(const char *s);
30
31 #endif /* _CRYPT_MD5_H */
32