X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=sha2%2Fsha384.c;h=c1c3d9976ce0cad935d7553c08d77f4f7c634c1b;hp=5781dc3c32a53c72247e28f319b790205d0458d8;hb=4b5da1dc27a791b5c448274a3db09cd035b33493;hpb=38e12ca0d3a9df2ca6809ab88fb2ea32e5aed8f8 diff --git a/sha2/sha384.c b/sha2/sha384.c index 5781dc3..c1c3d99 100644 --- a/sha2/sha384.c +++ b/sha2/sha384.c @@ -1,7 +1,7 @@ /* sha384.c */ /* This file is part of the ARM-Crypto-Lib. - Copyright (C) 2006-2011 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 @@ -25,11 +25,11 @@ #include "sha384.h" -void sha384_nextBlock (sha384_ctx_t* ctx, const void* block){ +void sha384_nextBlock (sha384_ctx_t *ctx, const void *block){ sha2_large_common_nextBlock(ctx, block); } -void sha384_lastBlock(sha384_ctx_t* ctx, const void* block, uint16_t length_b){ +void sha384_lastBlock(sha384_ctx_t *ctx, const void *block, uint16_t length_b){ sha2_large_common_lastBlock(ctx, block, length_b); } @@ -40,12 +40,12 @@ uint64_t sha384_init_values[8] PROGMEM = { }; -void sha384_init(sha384_ctx_t* ctx){ +void sha384_init(sha384_ctx_t *ctx){ ctx->length = 0; memcpy_P(ctx->h, sha384_init_values, 8*8); } -void sha384_ctx2hash(void* dest, const sha384_ctx_t* ctx){ +void sha384_ctx2hash(void *dest, const sha384_ctx_t *ctx){ uint8_t i=6, j, *s = (uint8_t*)(ctx->h); do{ j=7; @@ -58,7 +58,7 @@ void sha384_ctx2hash(void* dest, const sha384_ctx_t* ctx){ } -void sha384(void* dest, const void* msg, uint32_t length_b){ +void sha384(void *dest, const void *msg, uint32_t length_b){ sha384_ctx_t ctx; sha384_init(&ctx); while(length_b >= 1024){