X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=shabal%2Fshabal256.c;h=9fd2e0db7b239a2e496840dd149a6557e5b8a73a;hb=4b5da1dc27a791b5c448274a3db09cd035b33493;hp=6f5ca191119f4ed9d97dd57cc8af7c1ecc86a37e;hpb=4f50c75ee5a6cc88bf7ea71957ed509e298e6c25;p=avr-crypto-lib.git diff --git a/shabal/shabal256.c b/shabal/shabal256.c index 6f5ca19..9fd2e0d 100644 --- a/shabal/shabal256.c +++ b/shabal/shabal256.c @@ -1,7 +1,7 @@ /* shabal256.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 @@ -19,7 +19,7 @@ /* * \file shabal256.c * \author Daniel Otte - * \email daniel.otte@rub.de + * \email bg@nerilex.org * \date 2009-04-27 * \license GPLv3 or later * @@ -30,7 +30,7 @@ #include #include -uint32_t shabal256_iv[] PROGMEM = { +const uint32_t shabal256_iv[] PROGMEM = { /* A */ 0x52F84552, 0xE54B7999, 0x2D8EE3EC, 0xB9645191, 0xE0078B86, 0xBB7C44C9, 0xD2B5C1CA, 0xB0D2EB8C, @@ -47,7 +47,7 @@ uint32_t shabal256_iv[] PROGMEM = { 0xBC968828, 0xE6E00BF7, 0xBA839E55, 0x9B491C60 }; -void shabal256_init(shabal_ctx_t* ctx){ +void shabal256_init(shabal_ctx_t *ctx){ uint8_t i; ctx->b = ctx->b_buffer; ctx->c = ctx->c_buffer; @@ -63,11 +63,11 @@ void shabal256_init(shabal_ctx_t* ctx){ } } -void shabal256_ctx2hash(void* dest, const shabal_ctx_t* ctx){ +void shabal256_ctx2hash(void *dest, const shabal_ctx_t *ctx){ shabal_ctx2hash(dest, ctx, 256); } -void shabal256(void* dest, void* msg, uint32_t length_b){ +void shabal256(void *dest, void *msg, uint32_t length_b){ shabal_ctx_t ctx; shabal256_init(&ctx); while(length_b>=SHABAL_BLOCKSIZE){