Merge recent updates but without broken builder and with minor refactoring and bugfixes

This commit is contained in:
vit9696 2018-10-08 12:58:12 +03:00
parent b064495db8
commit 0a634ebcbd
37 changed files with 712 additions and 8665 deletions

View file

@ -187,7 +187,7 @@ int sha256_done(struct sha256_state *md, unsigned char *out)
if (md->curlen >= sizeof(md->buf))
return -1;
/* increase the length of the message */
md->length += md->curlen * 8;
md->length += (uint64_t)md->curlen * 8;
/* append the '1' bit */
md->buf[md->curlen++] = (unsigned char) 0x80;
/* if the length is currently above 56 bytes we append zeros