Home | History | Annotate | Download | only in openbsd-compat

Lines Matching refs:buffer

288 	memset(context->buffer, 0, sizeof(context->buffer));
461 /* Calculate how much free space is available in the buffer */
465 /* Fill the buffer completely and process it */
466 memcpy(&context->buffer[usedspace], data, freespace);
470 SHA256_Transform(context->state, context->buffer);
472 /* The buffer is not yet full */
473 memcpy(&context->buffer[usedspace], data, len);
489 memcpy(context->buffer, data, len);
504 context->buffer[usedspace++] = 0x80;
508 memset(&context->buffer[usedspace], 0,
512 memset(&context->buffer[usedspace], 0,
516 SHA256_Transform(context->state, context->buffer);
519 memset(context->buffer, 0, SHA256_SHORT_BLOCK_LENGTH);
523 memset(context->buffer, 0, SHA256_SHORT_BLOCK_LENGTH);
526 *context->buffer = 0x80;
529 BE_64_TO_8(&context->buffer[SHA256_SHORT_BLOCK_LENGTH],
533 SHA256_Transform(context->state, context->buffer);
544 /* If no digest buffer is passed, we don't bother doing this: */
568 memset(context->buffer, 0, sizeof(context->buffer));
742 /* Calculate how much free space is available in the buffer */
746 /* Fill the buffer completely and process it */
747 memcpy(&context->buffer[usedspace], data, freespace);
751 SHA512_Transform(context->state, context->buffer);
753 /* The buffer is not yet full */
754 memcpy(&context->buffer[usedspace], data, len);
770 memcpy(context->buffer, data, len);
785 context->buffer[usedspace++] = 0x80;
789 memset(&context->buffer[usedspace], 0, SHA512_SHORT_BLOCK_LENGTH - usedspace);
792 memset(&context->buffer[usedspace], 0, SHA512_BLOCK_LENGTH - usedspace);
795 SHA512_Transform(context->state, context->buffer);
798 memset(context->buffer, 0, SHA512_BLOCK_LENGTH - 2);
802 memset(context->buffer, 0, SHA512_SHORT_BLOCK_LENGTH);
805 *context->buffer = 0x80;
808 BE_64_TO_8(&context->buffer[SHA512_SHORT_BLOCK_LENGTH],
810 BE_64_TO_8(&context->buffer[SHA512_SHORT_BLOCK_LENGTH + 8],
814 SHA512_Transform(context->state, context->buffer);
825 /* If no digest buffer is passed, we don't bother doing this: */
850 memset(context->buffer, 0, sizeof(context->buffer));
863 /* If no digest buffer is passed, we don't bother doing this: */