X-Git-Url: https://git.cryptolib.org/avr-crypto-lib.git?a=blobdiff_plain;f=entropium%2Fentropium.c;h=daeaa132a572d56dabf526bbf45b6e625dc010a1;hb=4b5da1dc27a791b5c448274a3db09cd035b33493;hp=0cc360397b17f7cfb1dec806663bd21b9949516d;hpb=2bd3b1adfac19dfe2ef8eeb1d2f662d34c1a1844;p=avr-crypto-lib.git diff --git a/entropium/entropium.c b/entropium/entropium.c index 0cc3603..daeaa13 100644 --- a/entropium/entropium.c +++ b/entropium/entropium.c @@ -1,7 +1,7 @@ /* entropium.c */ /* This file is part of the AVR-Crypto-Lib. - Copyright (C) 2008 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 entropium.c * \author Daniel Otte - * \email daniel.otte@rub.de + * \email bg@nerilex.org * \date 2006-05-17 * \license GPLv3 or later * \brief This file contains an implementaition of a pseudo-random-number generator. @@ -65,7 +65,7 @@ uint32_t rndCore[16]; * * we simply first "hash" rndCore, then entropy. */ -void entropium_addEntropy(unsigned length_b, const void* data){ +void entropium_addEntropy(unsigned length_b, const void *data){ sha256_ctx_t s; static uint8_t offset=0; /* selects if higher or lower half gets updated */ sha256_init(&s); @@ -116,7 +116,7 @@ uint8_t entropium_getRandomByte(void){ return block[i++]; } -void entropium_fillBlockRandom(void* block, unsigned length_B){ +void entropium_fillBlockRandom(void *block, unsigned length_B){ while(length_B>ENTROPIUM_RANDOMBLOCK_SIZE){ entropium_getRandomBlock(block); block = (uint8_t*)block + ENTROPIUM_RANDOMBLOCK_SIZE;