*context->buffer = 0x80;
}
/* Set the bit count: */
- memcpy(&(context->buffer[SHA256_SHORT_BLOCK_LEN]), &(context->bitcount), sizeof(sha2_word64));
+ memcpy(&(context->buffer[SHA256_SHORT_BLOCK_LEN]), &(context->bitcount), sizeof(sha2_word64));
/* Final transform: */
SHA256_Transform(context, (sha2_word32*)context->buffer);
*context->buffer = 0x80;
}
/* Store the length of input data (in bits): */
- memcpy(&(context->buffer[SHA512_SHORT_BLOCK_LEN]), &(context->bitcount[1]), sizeof(sha2_word64));
- memcpy(&(context->buffer[SHA512_SHORT_BLOCK_LEN+8]), &(context->bitcount[0]), sizeof(sha2_word64));
+ memcpy(&(context->buffer[SHA512_SHORT_BLOCK_LEN]), &(context->bitcount[1]), sizeof(sha2_word64));
+ memcpy(&(context->buffer[SHA512_SHORT_BLOCK_LEN+8]), &(context->bitcount[0]), sizeof(sha2_word64));
/* Final transform: */
SHA512_Transform(context, (sha2_word64*)context->buffer);