Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/auth/password-scheme.h @ 1873:ed5e808d934f HEAD
CRAM-MD5 mechanism by Joshua Goodall, plus some cleanups.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 10 Nov 2003 22:36:02 +0200 |
parents | 76321f65960d |
children | 9ba79ebae6ab |
rev | line source |
---|---|
1192
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
1 #ifndef __PASSWORD_SCHEME_H |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
2 #define __PASSWORD_SCHEME_H |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
3 |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
4 /* Returns 1 = matched, 0 = didn't match, -1 = unknown scheme */ |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
5 int password_verify(const char *plaintext, const char *password, |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
6 const char *scheme, const char *user); |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
7 |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
8 /* Extracts scheme from password, or returns NULL if it isn't found. */ |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
9 const char *password_get_scheme(const char **password); |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
10 |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
11 /* Create wanted password scheme out of plaintext password and username. */ |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
12 const char *password_generate(const char *plaintext, const char *user, |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
13 const char *scheme); |
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
14 |
1873
ed5e808d934f
CRAM-MD5 mechanism by Joshua Goodall, plus some cleanups.
Timo Sirainen <tss@iki.fi>
parents:
1192
diff
changeset
|
15 /* INTERNAL: */ |
ed5e808d934f
CRAM-MD5 mechanism by Joshua Goodall, plus some cleanups.
Timo Sirainen <tss@iki.fi>
parents:
1192
diff
changeset
|
16 const char *password_generate_md5_crypt(const char *pw, const char *salt); |
ed5e808d934f
CRAM-MD5 mechanism by Joshua Goodall, plus some cleanups.
Timo Sirainen <tss@iki.fi>
parents:
1192
diff
changeset
|
17 const char *password_generate_cram_md5(const char *pw); |
ed5e808d934f
CRAM-MD5 mechanism by Joshua Goodall, plus some cleanups.
Timo Sirainen <tss@iki.fi>
parents:
1192
diff
changeset
|
18 |
1192
76321f65960d
Fix realm usage with DIGEST-MD5. Support generating other password schemes
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
19 #endif |