diff options
Diffstat (limited to 'sys/dev/random/hash.c')
-rw-r--r-- | sys/dev/random/hash.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/random/hash.c b/sys/dev/random/hash.c index ed796f1..a9246c3 100644 --- a/sys/dev/random/hash.c +++ b/sys/dev/random/hash.c @@ -28,10 +28,6 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/queue.h> -#include <sys/libkern.h> -#include <sys/random.h> -#include <sys/types.h> #include <crypto/rijndael/rijndael.h> @@ -55,9 +51,14 @@ yarrow_hash_iterate(struct yarrowhash *context, void *data, size_t size) { u_char temp[KEYSIZE]; u_int i, j; + union { + void *pv; + char *pc; + } trans; + trans.pv = data; for (i = 0; i < size; i++) { - context->accum[context->partial++] = ((u_char *)(data))[i]; + context->accum[context->partial++] = trans.pc[i]; if (context->partial == (KEYSIZE - 1)) { rijndael_makeKey(&context->hashkey, DIR_ENCRYPT, KEYSIZE*8, context->accum); |