diff options
Diffstat (limited to 'Source/lib/crypto/hashers/md5_hasher.c')
-rw-r--r-- | Source/lib/crypto/hashers/md5_hasher.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/lib/crypto/hashers/md5_hasher.c b/Source/lib/crypto/hashers/md5_hasher.c index cd883d92c..8d6361139 100644 --- a/Source/lib/crypto/hashers/md5_hasher.c +++ b/Source/lib/crypto/hashers/md5_hasher.c @@ -25,10 +25,11 @@ * for more details. */ +#include <string.h> + #include "md5_hasher.h" #include <definitions.h> -#include <utils/allocator.h> #define BLOCK_SIZE_MD5 16 @@ -334,7 +335,7 @@ static void allocate_hash(private_md5_hasher_t *this, chunk_t chunk, chunk_t *ha MD5Update(this, chunk.ptr, chunk.len); if (hash != NULL) { - allocated_hash.ptr = allocator_alloc(BLOCK_SIZE_MD5); + allocated_hash.ptr = malloc(BLOCK_SIZE_MD5); allocated_hash.len = BLOCK_SIZE_MD5; MD5Final(this, allocated_hash.ptr); @@ -370,7 +371,7 @@ static void reset(private_md5_hasher_t *this) */ static void destroy(private_md5_hasher_t *this) { - allocator_free(this); + free(this); } /* @@ -378,7 +379,7 @@ static void destroy(private_md5_hasher_t *this) */ md5_hasher_t *md5_hasher_create() { - private_md5_hasher_t *this = allocator_alloc_thing(private_md5_hasher_t); + private_md5_hasher_t *this = malloc_thing(private_md5_hasher_t); this->public.hasher_interface.get_hash = (void (*) (hasher_t*, chunk_t, u_int8_t*))get_hash; this->public.hasher_interface.allocate_hash = (void (*) (hasher_t*, chunk_t, chunk_t*))allocate_hash; |