]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - shacal1/shacal1_enc.c
switch gcm-test from aes to aes-enconly
[avr-crypto-lib.git] / shacal1 / shacal1_enc.c
index 634f18d3d42e1375d897f2353db9de57bfccf4d0..052dc2707d2ffe129d5c88d65c6cee46a3aa2160 100644 (file)
@@ -31,7 +31,7 @@
 #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)