… | |
… | |
3 | * Rights to this code are documented in doc/pod/license.pod. |
3 | * Rights to this code are documented in doc/pod/license.pod. |
4 | * |
4 | * |
5 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
5 | * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) |
6 | */ |
6 | */ |
7 | |
7 | |
8 | static char const rcsid[] = "$Id: crypto.C,v 1.4 2007/08/28 17:08:12 pippijn Exp $"; |
8 | static char const rcsid[] = "$Id: crypto.C,v 1.5 2007/09/04 11:13:25 pippijn Exp $"; |
9 | |
9 | |
10 | #include "atheme.h" |
10 | #include "atheme.h" |
11 | #include <ermyth/crypto.h> |
11 | #include <ermyth/crypto.h> |
12 | |
12 | |
13 | static char saltbuf[BUFSIZE]; |
13 | static char saltbuf[BUFSIZE]; |
… | |
… | |
30 | * crypt_verify_password is a frontend to crypt_string(). |
30 | * crypt_verify_password is a frontend to crypt_string(). |
31 | */ |
31 | */ |
32 | bool |
32 | bool |
33 | verify_password (char const * const uinput, char const * const pass) |
33 | verify_password (char const * const uinput, char const * const pass) |
34 | { |
34 | { |
35 | char const * const cstr = crypt (uinput, pass); |
35 | char const * const cstr = crypter->crypt (uinput, pass); |
36 | |
36 | |
37 | if (!strcmp (cstr, pass)) |
37 | if (!strcmp (cstr, pass)) |
38 | return true; |
38 | return true; |
39 | |
39 | |
40 | return false; |
40 | return false; |