Lines Matching defs:buffer

470 	sha2_byte	buffer[SHA256_BLOCK_LENGTH];
515 W256 = (sha2_word32*)sha->buffer;
573 W256 = (sha2_word32*)sha->buffer;
659 /* Calculate how much free space is available in the buffer */
663 /* Fill the buffer completely and process it */
664 MEMCPY_BCOPY(&sha->buffer[usedspace], data, freespace);
668 SHA256_Transform(sha, (sha2_word32*)sha->buffer);
670 /* The buffer is not yet full */
671 MEMCPY_BCOPY(&sha->buffer[usedspace], data, len);
687 MEMCPY_BCOPY(sha->buffer, data, len);
702 MEMSET_BZERO(sha->buffer, SHA256_BLOCK_LENGTH);
739 sha->buffer[usedspace++] = 0x80;
743 MEMSET_BZERO(&sha->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace);
746 MEMSET_BZERO(&sha->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace);
749 SHA256_Transform(sha, (sha2_word32*)sha->buffer);
752 MEMSET_BZERO(sha->buffer, SHA256_SHORT_BLOCK_LENGTH);
756 MEMSET_BZERO(sha->buffer, SHA256_SHORT_BLOCK_LENGTH);
759 *sha->buffer = 0x80;
762 *(sha2_word64*)&sha->buffer[SHA256_SHORT_BLOCK_LENGTH] = sha->bitcount;
765 SHA256_Transform(sha, (sha2_word32*)sha->buffer);
839 sha2_byte buffer[SHA512_BLOCK_LENGTH];
880 sha2_word64 T1, *W512 = (sha2_word64*)sha->buffer;
935 sha2_word64 T1, T2, *W512 = (sha2_word64*)sha->buffer;
1022 /* Calculate how much free space is available in the buffer */
1026 /* Fill the buffer completely and process it */
1027 MEMCPY_BCOPY(&sha->buffer[usedspace], data, freespace);
1031 SHA512_Transform(sha, (sha2_word64*)sha->buffer);
1033 /* The buffer is not yet full */
1034 MEMCPY_BCOPY(&sha->buffer[usedspace], data, len);
1050 MEMCPY_BCOPY(sha->buffer, data, len);
1065 MEMSET_BZERO(sha->buffer, SHA512_BLOCK_LENGTH);
1100 sha->buffer[usedspace++] = 0x80;
1104 MEMSET_BZERO(&sha->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace);
1107 MEMSET_BZERO(&sha->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace);
1110 SHA512_Transform(sha, (sha2_word64*)sha->buffer);
1113 MEMSET_BZERO(sha->buffer, SHA512_BLOCK_LENGTH - 2);
1117 MEMSET_BZERO(sha->buffer, SHA512_SHORT_BLOCK_LENGTH);
1120 *sha->buffer = 0x80;
1123 *(sha2_word64*)&sha->buffer[SHA512_SHORT_BLOCK_LENGTH] = sha->bitcount[1];
1124 *(sha2_word64*)&sha->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = sha->bitcount[0];
1127 SHA512_Transform(sha, (sha2_word64*)sha->buffer);
1203 MEMSET_BZERO(sha->buffer, SHA384_BLOCK_LENGTH);