X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=hmac-sha1%2Fhmac-sha1.c;fp=hmac-sha1%2Fhmac-sha1.c;h=9f225909e193345bb67e6cefe39ba42c3cbcd157;hp=3ac88722ca814eb8f870e8157d96bcdc79be1e1b;hb=3a9f9d918fb95474996af535c225a7e187d88372;hpb=33d65e8032f77c1cbec1bc99e898affc96966c3c diff --git a/hmac-sha1/hmac-sha1.c b/hmac-sha1/hmac-sha1.c index 3ac8872..9f22590 100644 --- a/hmac-sha1/hmac-sha1.c +++ b/hmac-sha1/hmac-sha1.c @@ -40,7 +40,7 @@ #ifndef HMAC_SHORTONLY -void hmac_sha1_init(hmac_sha1_ctx_t *s, const void* key, uint16_t keylength_b){ +void hmac_sha1_init(hmac_sha1_ctx_t *s, const void *key, uint16_t keylength_b){ uint8_t buffer[SHA1_BLOCK_BYTES]; uint8_t i; @@ -69,10 +69,10 @@ void hmac_sha1_init(hmac_sha1_ctx_t *s, const void* key, uint16_t keylength_b){ #endif } -void hmac_sha1_nextBlock(hmac_sha1_ctx_t *s, const void* block){ +void hmac_sha1_nextBlock(hmac_sha1_ctx_t *s, const void *block){ sha1_nextBlock(&(s->a), block); } -void hmac_sha1_lastBlock(hmac_sha1_ctx_t *s, const void* block, uint16_t length_b){ +void hmac_sha1_lastBlock(hmac_sha1_ctx_t *s, const void *block, uint16_t length_b){ while(length_b>=SHA1_BLOCK_BITS){ sha1_nextBlock(&s->a, block); block = (uint8_t*)block + SHA1_BLOCK_BYTES; @@ -81,7 +81,7 @@ void hmac_sha1_lastBlock(hmac_sha1_ctx_t *s, const void* block, uint16_t length_ sha1_lastBlock(&s->a, block, length_b); } -void hmac_sha1_final(void* dest, hmac_sha1_ctx_t *s){ +void hmac_sha1_final(void *dest, hmac_sha1_ctx_t *s){ sha1_ctx2hash(dest, &s->a); sha1_lastBlock(&s->b, dest, SHA1_HASH_BITS); sha1_ctx2hash(dest, &(s->b)); @@ -93,7 +93,7 @@ void hmac_sha1_final(void* dest, hmac_sha1_ctx_t *s){ * keylength in bits! * message length in bits! */ -void hmac_sha1(void* dest, const void* key, uint16_t keylength_b, const void* msg, uint32_t msglength_b){ /* a one-shot*/ +void hmac_sha1(void *dest, const void *key, uint16_t keylength_b, const void *msg, uint32_t msglength_b){ /* a one-shot*/ sha1_ctx_t s; uint8_t i; uint8_t buffer[SHA1_BLOCK_BYTES];