diff options
author | Martin Willi <martin@strongswan.org> | 2007-02-12 15:56:47 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2007-02-12 15:56:47 +0000 |
commit | f27f6296e6ae5beece739342fd54528cf91e5394 (patch) | |
tree | c868a123b98b8a244b249473ab91b0bd4a764b31 /src/libstrongswan/crypto/hashers/md5_hasher.c | |
parent | 6fda18d99d2b6eac921e731a52229d9c1cf8a295 (diff) | |
download | strongswan-f27f6296e6ae5beece739342fd54528cf91e5394.tar.bz2 strongswan-f27f6296e6ae5beece739342fd54528cf91e5394.tar.xz |
merged EAP framework from branch into trunk
includes a lot of other modifications
Diffstat (limited to 'src/libstrongswan/crypto/hashers/md5_hasher.c')
-rw-r--r-- | src/libstrongswan/crypto/hashers/md5_hasher.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libstrongswan/crypto/hashers/md5_hasher.c b/src/libstrongswan/crypto/hashers/md5_hasher.c index fa61cac5b..5330676d4 100644 --- a/src/libstrongswan/crypto/hashers/md5_hasher.c +++ b/src/libstrongswan/crypto/hashers/md5_hasher.c @@ -364,6 +364,19 @@ static void reset(private_md5_hasher_t *this) } /** + * Implementation of hasher_t.get_state + */ +static chunk_t get_state(private_md5_hasher_t *this) +{ + chunk_t chunk; + + chunk.ptr = (u_char*)&this->state[0]; + chunk.len = sizeof(this->state); + + return chunk; +} + +/** * Implementation of hasher_t.destroy. */ static void destroy(private_md5_hasher_t *this) @@ -382,6 +395,7 @@ md5_hasher_t *md5_hasher_create(void) this->public.hasher_interface.allocate_hash = (void (*) (hasher_t*, chunk_t, chunk_t*))allocate_hash; this->public.hasher_interface.get_hash_size = (size_t (*) (hasher_t*))get_hash_size; this->public.hasher_interface.reset = (void (*) (hasher_t*))reset; + this->public.hasher_interface.get_state = (chunk_t (*) (hasher_t*))get_state; this->public.hasher_interface.destroy = (void (*) (hasher_t*))destroy; /* initialize */ |