summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/sha1/sha1_hasher.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/sha1/sha1_hasher.c')
-rw-r--r--src/libstrongswan/plugins/sha1/sha1_hasher.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libstrongswan/plugins/sha1/sha1_hasher.c b/src/libstrongswan/plugins/sha1/sha1_hasher.c
index 4d69ad5a4..b0efbae7d 100644
--- a/src/libstrongswan/plugins/sha1/sha1_hasher.c
+++ b/src/libstrongswan/plugins/sha1/sha1_hasher.c
@@ -175,7 +175,7 @@ static void SHA1Final(private_sha1_hasher_t *this, u_int8_t *digest)
}
}
-METHOD(hasher_t, reset, void,
+METHOD(hasher_t, reset, bool,
private_sha1_hasher_t *this)
{
this->state[0] = 0x67452301;
@@ -185,9 +185,11 @@ METHOD(hasher_t, reset, void,
this->state[4] = 0xC3D2E1F0;
this->count[0] = 0;
this->count[1] = 0;
+
+ return TRUE;
}
-METHOD(hasher_t, get_hash, void,
+METHOD(hasher_t, get_hash, bool,
private_sha1_hasher_t *this, chunk_t chunk, u_int8_t *buffer)
{
SHA1Update(this, chunk.ptr, chunk.len);
@@ -196,9 +198,10 @@ METHOD(hasher_t, get_hash, void,
SHA1Final(this, buffer);
reset(this);
}
+ return TRUE;
}
-METHOD(hasher_t, allocate_hash, void,
+METHOD(hasher_t, allocate_hash, bool,
private_sha1_hasher_t *this, chunk_t chunk, chunk_t *hash)
{
SHA1Update(this, chunk.ptr, chunk.len);
@@ -210,6 +213,7 @@ METHOD(hasher_t, allocate_hash, void,
SHA1Final(this, hash->ptr);
reset(this);
}
+ return TRUE;
}
METHOD(hasher_t, get_hash_size, size_t,