X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=hmac-md5%2Fhmac-md5.c;h=ba4a882e2d5b82ad96d3c6ddf868724e25628fa0;hp=241ebcfae556bad62ebd874c10dc9ddf89be3901;hb=4b5da1dc27a791b5c448274a3db09cd035b33493;hpb=7b5401ab9ce23a5da1de8b6c7de3a1aa20ac4cf8 diff --git a/hmac-md5/hmac-md5.c b/hmac-md5/hmac-md5.c index 241ebcf..ba4a882 100644 --- a/hmac-md5/hmac-md5.c +++ b/hmac-md5/hmac-md5.c @@ -1,7 +1,7 @@ /* hmac-md5.c */ /* This file is part of the AVR-Crypto-Lib. - Copyright (C) 2009 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 @@ -20,7 +20,7 @@ * * implementation of HMAC as described in RFC2104 * Author: Daniel Otte - * email: daniel.otte@rub.de + * email: bg@nerilex.org * License: GPLv3 or later **/ @@ -31,7 +31,7 @@ #include #include #include "config.h" -#include "md5/md5.h" +#include "md5.h" #include "hmac-md5.h" #define IPAD 0x36 @@ -39,7 +39,7 @@ #ifndef HMAC_SHORTONLY -void hmac_md5_init(hmac_md5_ctx_t *s, void* key, uint16_t keylength_b){ +void hmac_md5_init(hmac_md5_ctx_t *s, void *key, uint16_t keylength_b){ uint8_t buffer[MD5_BLOCK_BYTES]; uint8_t i; @@ -67,15 +67,15 @@ void hmac_md5_init(hmac_md5_ctx_t *s, void* key, uint16_t keylength_b){ #endif } -void hmac_md5_nextBlock(hmac_md5_ctx_t *s, const void* block){ +void hmac_md5_nextBlock(hmac_md5_ctx_t *s, const void *block){ md5_nextBlock(&(s->a), block); } -void hmac_md5_lastBlock(hmac_md5_ctx_t *s, const void* block, uint16_t length_b){ +void hmac_md5_lastBlock(hmac_md5_ctx_t *s, const void *block, uint16_t length_b){ md5_lastBlock(&(s->a), block, length_b); } -void hmac_md5_final(void* dest, hmac_md5_ctx_t *s){ +void hmac_md5_final(void *dest, hmac_md5_ctx_t *s){ md5_ctx2hash((md5_hash_t*)dest, &(s->a)); md5_lastBlock(&(s->b), dest, MD5_HASH_BITS); md5_ctx2hash((md5_hash_t*)dest, &(s->b)); @@ -92,7 +92,7 @@ void hmac_md5_lastBlock() * keylength in bits! * message length in bits! */ -void hmac_md5(void* dest, void* key, uint16_t keylength_b, void* msg, uint32_t msglength_b){ /* a one-shot*/ +void hmac_md5(void *dest, void *key, uint16_t keylength_b, void *msg, uint32_t msglength_b){ /* a one-shot*/ md5_ctx_t s; uint8_t i; uint8_t buffer[MD5_BLOCK_BYTES];