diff options
| author | David Sommerseth <dazo@users.sourceforge.net> | 2009-01-02 17:41:48 +0100 |
|---|---|---|
| committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-01-02 17:41:48 +0100 |
| commit | 241b14d771d247127508cf7b20f833b9dbe0abda (patch) | |
| tree | e43906492727d02827a21147f380ffb670cfc62a /database/sqlite | |
| parent | a2ca4fdf6c6eee2d229c8cb7770f37accd467d93 (diff) | |
| download | eurephia-241b14d771d247127508cf7b20f833b9dbe0abda.tar.gz eurephia-241b14d771d247127508cf7b20f833b9dbe0abda.tar.xz eurephia-241b14d771d247127508cf7b20f833b9dbe0abda.zip | |
Prepared passwdhash function to allow salting and be prepared for other hashing algorithms
Diffstat (limited to 'database/sqlite')
| -rw-r--r-- | database/sqlite/administration.c | 2 | ||||
| -rw-r--r-- | database/sqlite/edb-sqlite.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/database/sqlite/administration.c b/database/sqlite/administration.c index 57bc4e4..4b174d9 100644 --- a/database/sqlite/administration.c +++ b/database/sqlite/administration.c @@ -103,7 +103,7 @@ int eDBadminAuth(eurephiaCTX *ctx, const char *req_access, const char *uname, co // // Authenticate user and password // - crpwd = passwdhash(pwd); + crpwd = passwdhash(pwdSHA512, NULL, pwd); assert(crpwd != NULL); res = sqlite_query(ctx, "SELECT activated, deactivated, bl.blid, " diff --git a/database/sqlite/edb-sqlite.c b/database/sqlite/edb-sqlite.c index 27897f1..5b8073c 100644 --- a/database/sqlite/edb-sqlite.c +++ b/database/sqlite/edb-sqlite.c @@ -236,7 +236,7 @@ int eDBauth_user(eurephiaCTX *ctx, const int certid, const char *username, const // Generate SHA512 hash of password, used for password auth - crpwd = passwdhash(passwd); + crpwd = passwdhash(pwdSHA512, NULL, passwd); res = sqlite_query(ctx, "SELECT uicid, ou.uid, activated, deactivated, bl1.blid, bl2.blid, " |
