Lines Matching refs:usedspace

653 	unsigned int	freespace, usedspace;  in sha256_block()  local
657 usedspace = (sha->bitcount >> 3) % SHA256_BLOCK_LENGTH; in sha256_block()
658 if (usedspace > 0) { in sha256_block()
660 freespace = SHA256_BLOCK_LENGTH - usedspace; in sha256_block()
664 MEMCPY_BCOPY(&sha->buffer[usedspace], data, freespace); in sha256_block()
671 MEMCPY_BCOPY(&sha->buffer[usedspace], data, len); in sha256_block()
674 usedspace = freespace = 0; in sha256_block()
691 usedspace = freespace = 0; in sha256_block()
726 unsigned int usedspace; in sha256_done() local
732 usedspace = (sha->bitcount >> 3) % SHA256_BLOCK_LENGTH; in sha256_done()
737 if (usedspace > 0) { in sha256_done()
739 sha->buffer[usedspace++] = 0x80; in sha256_done()
741 if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) { in sha256_done()
743 MEMSET_BZERO(&sha->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace); in sha256_done()
745 if (usedspace < SHA256_BLOCK_LENGTH) { in sha256_done()
746 MEMSET_BZERO(&sha->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace); in sha256_done()
787 usedspace = 0; in sha256_done()
1016 unsigned int freespace, usedspace; in sha512_block() local
1020 usedspace = (sha->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; in sha512_block()
1021 if (usedspace > 0) { in sha512_block()
1023 freespace = SHA512_BLOCK_LENGTH - usedspace; in sha512_block()
1027 MEMCPY_BCOPY(&sha->buffer[usedspace], data, freespace); in sha512_block()
1034 MEMCPY_BCOPY(&sha->buffer[usedspace], data, len); in sha512_block()
1037 usedspace = freespace = 0; in sha512_block()
1054 usedspace = freespace = 0; in sha512_block()
1089 unsigned int usedspace; in sha512_done() local
1092 usedspace = (sha->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; in sha512_done()
1098 if (usedspace > 0) { in sha512_done()
1100 sha->buffer[usedspace++] = 0x80; in sha512_done()
1102 if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) { in sha512_done()
1104 MEMSET_BZERO(&sha->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace); in sha512_done()
1106 if (usedspace < SHA512_BLOCK_LENGTH) { in sha512_done()
1107 MEMSET_BZERO(&sha->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace); in sha512_done()
1149 usedspace = 0; in sha512_done()