Test reset() of hasher in crypto tester

This commit is contained in:
Martin Willi
2012-07-16 14:55:07 +02:00
parent 67ea663d7c
commit 44fc169579
+9 -1
View File
@@ -746,8 +746,16 @@ METHOD(crypto_tester_t, test_hasher, bool,
{
goto failure;
}
/* hash to existing buffer */
/* hash to existing buffer, with a reset */
memset(hash.ptr, 0, hash.len);
if (!hasher->get_hash(hasher, data, NULL))
{
goto failure;
}
if (!hasher->reset(hasher))
{
goto failure;
}
if (!hasher->get_hash(hasher, data, hash.ptr))
{
goto failure;