Add a return value to hasher_t.get_hash()

This commit is contained in:
Martin Willi
2012-07-16 14:55:06 +02:00
parent ce73fc19db
commit 8bd6a30af1
23 changed files with 174 additions and 89 deletions
+5 -1
View File
@@ -58,7 +58,11 @@ METHOD(storage_t, login, int,
data = chunk_alloca(username_len + password_len);
memcpy(data.ptr, username, username_len);
memcpy(data.ptr + username_len, password, password_len);
hasher->get_hash(hasher, data, hash.ptr);
if (!hasher->get_hash(hasher, data, hash.ptr))
{
hasher->destroy(hasher);
return 0;
}
hasher->destroy(hasher);
hex_str = chunk_to_hex(hash, NULL, FALSE);