diff options
author | Martin Willi <martin@strongswan.org> | 2006-04-10 08:07:38 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-04-10 08:07:38 +0000 |
commit | 5113680f95e522c677cdd37072cfffbdca06831e (patch) | |
tree | 973ac57accbc66b042e5307942c6cbbbf4f19579 /Source/lib/crypto/hashers/sha1_hasher.c | |
parent | 6862128151fb78f63685a8da5575783c426d64a7 (diff) | |
download | strongswan-5113680f95e522c677cdd37072cfffbdca06831e.tar.bz2 strongswan-5113680f95e522c677cdd37072cfffbdca06831e.tar.xz |
- split up in libstrong, charon, stroke, testing done
- new leak detective with malloc hook in library
- useable, but needs improvements
- logger_manager has now a single instance per library
- allows use of loggers from any linking prog
- a LOT of other things
Diffstat (limited to 'Source/lib/crypto/hashers/sha1_hasher.c')
-rw-r--r-- | Source/lib/crypto/hashers/sha1_hasher.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/lib/crypto/hashers/sha1_hasher.c b/Source/lib/crypto/hashers/sha1_hasher.c index 2fa659f74..b66e75ada 100644 --- a/Source/lib/crypto/hashers/sha1_hasher.c +++ b/Source/lib/crypto/hashers/sha1_hasher.c @@ -23,10 +23,11 @@ * for more details. */ +#include <string.h> + #include "sha1_hasher.h" #include <definitions.h> -#include <utils/allocator.h> #define BLOCK_SIZE_SHA1 20 @@ -208,7 +209,7 @@ static void allocate_hash(private_sha1_hasher_t *this, chunk_t chunk, chunk_t *h SHA1Update(this, chunk.ptr, chunk.len); if (hash != NULL) { - allocated_hash.ptr = allocator_alloc(BLOCK_SIZE_SHA1); + allocated_hash.ptr = malloc(BLOCK_SIZE_SHA1); allocated_hash.len = BLOCK_SIZE_SHA1; SHA1Final(this, allocated_hash.ptr); @@ -244,7 +245,7 @@ static void reset(private_sha1_hasher_t *this) */ static void destroy(private_sha1_hasher_t *this) { - allocator_free(this); + free(this); } @@ -253,7 +254,7 @@ static void destroy(private_sha1_hasher_t *this) */ sha1_hasher_t *sha1_hasher_create() { - private_sha1_hasher_t *this = allocator_alloc_thing(private_sha1_hasher_t); + private_sha1_hasher_t *this = malloc_thing(private_sha1_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; |