Lines Matching refs:buffer

331 	bzero(context->buffer, SHA256_BLOCK_LENGTH);
377 W256 = (sha2_word32*)context->buffer;
435 W256 = (sha2_word32*)context->buffer;
523 /* Calculate how much free space is available in the buffer */
527 /* Fill the buffer completely and process it */
528 bcopy(data, &context->buffer[usedspace], freespace);
532 SHA256_Transform(context, (sha2_word32*)context->buffer);
534 /* The buffer is not yet full */
535 bcopy(data, &context->buffer[usedspace], len);
551 bcopy(data, context->buffer, len);
565 /* If no digest buffer is passed, we don't bother doing this: */
574 context->buffer[usedspace++] = 0x80;
578 bzero(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace);
581 bzero(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace);
584 SHA256_Transform(context, (sha2_word32*)context->buffer);
587 bzero(context->buffer, SHA256_SHORT_BLOCK_LENGTH);
591 bzero(context->buffer, SHA256_SHORT_BLOCK_LENGTH);
594 *context->buffer = 0x80;
597 *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;
600 SHA256_Transform(context, (sha2_word32*)context->buffer);
621 char *SHA256_End(SHA256_CTX* context, char buffer[]) {
628 if (buffer != (char*)0) {
632 *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
633 *buffer++ = sha2_hex_digits[*d & 0x0f];
636 *buffer = (char)0;
641 return buffer;
659 bzero(context->buffer, SHA512_BLOCK_LENGTH);
701 sha2_word64 T1, *W512 = (sha2_word64*)context->buffer;
756 sha2_word64 T1 = 0, T2 = 0, *W512 = (sha2_word64*)context->buffer;
845 /* Calculate how much free space is available in the buffer */
849 /* Fill the buffer completely and process it */
850 bcopy(data, &context->buffer[usedspace], freespace);
854 SHA512_Transform(context, (sha2_word64*)context->buffer);
856 /* The buffer is not yet full */
857 bcopy(data, &context->buffer[usedspace], len);
873 bcopy(data, context->buffer, len);
891 context->buffer[usedspace++] = 0x80;
895 bzero(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace);
898 bzero(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace);
901 SHA512_Transform(context, (sha2_word64*)context->buffer);
904 bzero(context->buffer, SHA512_BLOCK_LENGTH - 2);
908 bzero(context->buffer, SHA512_SHORT_BLOCK_LENGTH);
911 *context->buffer = 0x80;
914 *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1];
915 *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];
918 SHA512_Transform(context, (sha2_word64*)context->buffer);
927 /* If no digest buffer is passed, we don't bother doing this: */
950 char *SHA512_End(SHA512_CTX* context, char buffer[]) {
957 if (buffer != (char*)0) {
961 *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
962 *buffer++ = sha2_hex_digits[*d & 0x0f];
965 *buffer = (char)0;
970 return buffer;
988 bzero(context->buffer, SHA384_BLOCK_LENGTH);
1002 /* If no digest buffer is passed, we don't bother doing this: */
1025 char *SHA384_End(SHA384_CTX* context, char buffer[]) {
1032 if (buffer != (char*)0) {
1036 *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
1037 *buffer++ = sha2_hex_digits[*d & 0x0f];
1040 *buffer = (char)0;
1045 return buffer;