X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=shacal1%2Fshacal1_enc.c;h=e87a7982e8d845674903850806a411da77bb467d;hb=b8aa8d06134ce687993cb3148d66ebd86dbf1d6f;hp=62e5cd4785358926331778f8e35818329a0a2f4b;hpb=7b5401ab9ce23a5da1de8b6c7de3a1aa20ac4cf8;p=avr-crypto-lib.git diff --git a/shacal1/shacal1_enc.c b/shacal1/shacal1_enc.c index 62e5cd4..e87a798 100644 --- a/shacal1/shacal1_enc.c +++ b/shacal1/shacal1_enc.c @@ -1,7 +1,7 @@ /* shacal1_enc.c */ /* This file is part of the AVR-Crypto-Lib. - Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de) + Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,10 +28,10 @@ #include #include -#include "sha1/sha1.h" +#include "sha1.h" #include "shacal1_enc.h" -void shacal1_enc(void* buffer, void* key, uint16_t keysize_b){ +void shacal1_enc(void *buffer, void *key, uint16_t keysize_b){ sha1_ctx_t ctx, t_ctx; uint8_t i; memcpy(t_ctx.h, buffer, SHA1_HASH_BITS/8); @@ -43,7 +43,7 @@ void shacal1_enc(void* buffer, void* key, uint16_t keysize_b){ memcpy(keybuffer, key, (keysize_b+7)/8); memcpy(t_ctx.h, buffer, SHA1_HASH_BITS/8); - sha1_ctx2hash((sha1_hash_t*)(&(ctx.h[0])), &t_ctx); + sha1_ctx2hash(&ctx.h[0], &t_ctx); memcpy(t_ctx.h, ctx.h, SHA1_HASH_BITS/8); sha1_nextBlock(&ctx, keybuffer); for(i=0; i<5; ++i)