]> git.ipfire.org Git - thirdparty/squid.git/blame - src/auth/basic/NCSA/crypt_md5.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / auth / basic / NCSA / crypt_md5.h
CommitLineData
5b95b903 1/*
b8ae064d 2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
5b95b903
AJ
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
363a8ce8 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 */
0d8565ac
AJ
23#ifndef _CRYPT_MD5_H
24#define _CRYPT_MD5_H
25
363a8ce8 26char *crypt_md5(const char *pw, const char *salt);
8655ee19 27
28/* MD5 hash without salt */
29char *md5sum(const char *s);
0d8565ac
AJ
30
31#endif /* _CRYPT_MD5_H */
f53969cc 32