Lines Matching refs:buffer

375 	MEMSET_BZERO(context->buffer, SHA256_BLOCK_LENGTH);  in SHA256_Init()
421 W256 = (sha2_word32*)context->buffer; in SHA256_Transform()
479 W256 = (sha2_word32*)context->buffer; in SHA256_Transform()
572 MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace); in SHA256_Update()
576 SHA256_Transform(context, (sha2_word32*)context->buffer); in SHA256_Update()
579 MEMCPY_BCOPY(&context->buffer[usedspace], data, len); in SHA256_Update()
595 MEMCPY_BCOPY(context->buffer, data, len); in SHA256_Update()
618 context->buffer[usedspace++] = 0x80; in SHA256_Final()
622 MEMSET_BZERO(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace); in SHA256_Final()
625 MEMSET_BZERO(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace); in SHA256_Final()
628 SHA256_Transform(context, (sha2_word32*)context->buffer); in SHA256_Final()
631 MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH); in SHA256_Final()
635 MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH); in SHA256_Final()
638 *context->buffer = 0x80; in SHA256_Final()
641 *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount; in SHA256_Final()
644 SHA256_Transform(context, (sha2_word32*)context->buffer); in SHA256_Final()
665 char *SHA256_End(SHA256_CTX* context, char buffer[]) { in SHA256_End() argument
672 if (buffer != (char*)0) { in SHA256_End()
676 *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4]; in SHA256_End()
677 *buffer++ = sha2_hex_digits[*d & 0x0f]; in SHA256_End()
680 *buffer = (char)0; in SHA256_End()
685 return buffer; in SHA256_End()
704 MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH); in SHA512_Init()
746 sha2_word64 T1, *W512 = (sha2_word64*)context->buffer; in SHA512_Transform()
801 sha2_word64 T1, T2, *W512 = (sha2_word64*)context->buffer; in SHA512_Transform()
895 MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace); in SHA512_Update()
899 SHA512_Transform(context, (sha2_word64*)context->buffer); in SHA512_Update()
902 MEMCPY_BCOPY(&context->buffer[usedspace], data, len); in SHA512_Update()
918 MEMCPY_BCOPY(context->buffer, data, len); in SHA512_Update()
936 context->buffer[usedspace++] = 0x80; in SHA512_Last()
940 MEMSET_BZERO(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace); in SHA512_Last()
943 MEMSET_BZERO(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace); in SHA512_Last()
946 SHA512_Transform(context, (sha2_word64*)context->buffer); in SHA512_Last()
949 MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH - 2); in SHA512_Last()
953 MEMSET_BZERO(context->buffer, SHA512_SHORT_BLOCK_LENGTH); in SHA512_Last()
956 *context->buffer = 0x80; in SHA512_Last()
959 *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1]; in SHA512_Last()
960 *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0]; in SHA512_Last()
963 SHA512_Transform(context, (sha2_word64*)context->buffer); in SHA512_Last()
995 char *SHA512_End(SHA512_CTX* context, char buffer[]) { in SHA512_End() argument
1002 if (buffer != (char*)0) { in SHA512_End()
1006 *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4]; in SHA512_End()
1007 *buffer++ = sha2_hex_digits[*d & 0x0f]; in SHA512_End()
1010 *buffer = (char)0; in SHA512_End()
1015 return buffer; in SHA512_End()
1034 MEMSET_BZERO(context->buffer, SHA384_BLOCK_LENGTH); in SHA384_Init()
1071 char *SHA384_End(SHA384_CTX* context, char buffer[]) { in SHA384_End() argument
1078 if (buffer != (char*)0) { in SHA384_End()
1082 *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4]; in SHA384_End()
1083 *buffer++ = sha2_hex_digits[*d & 0x0f]; in SHA384_End()
1086 *buffer = (char)0; in SHA384_End()
1091 return buffer; in SHA384_End()