[riot-devel] sha256

Oleg Hahm oliver.hahm at inria.fr
Fri Dec 16 18:58:20 CET 2016

Hey Paco!

On Fri, Dec 16, 2016 at 06:47:19PM +0100, Francisco Javier Acosta Padilla wrote:
> I’m trying the sha256 module on RIOT master and I just realised it returns
> always a different value… for now, I’m doing this:
> sha256_init(&sha256);
> sha256_update(&sha256, (uint8_t*)firmware_bin, firmware_size);
> sha256_final(&sha256, metadata.hash);
> To initialise and store the hash, according to the unittest which does very
> similar.
> Am I doing something wrong?

Strange. At a first glance your code seems to be valid for me. Could you share
a pointer to your project? Is maybe first somehow corrupted or is metadata a
part of firmware_bin?


DPRINTK("strange things happen ...\n");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20161216/bfe20eb0/attachment.sig>

More information about the devel mailing list