Lines Matching refs:usedspace

525 	u_int64_t	freespace, usedspace;  in SHA256Update()  local
531 usedspace = (context->bitcount[0] >> 3) % SHA256_BLOCK_LENGTH; in SHA256Update()
532 if (usedspace > 0) { in SHA256Update()
534 freespace = SHA256_BLOCK_LENGTH - usedspace; in SHA256Update()
538 memcpy(&context->buffer[usedspace], data, freespace); in SHA256Update()
545 memcpy(&context->buffer[usedspace], data, len); in SHA256Update()
548 usedspace = freespace = 0; in SHA256Update()
565 usedspace = freespace = 0; in SHA256Update()
572 unsigned int usedspace; in SHA256Pad() local
574 usedspace = (context->bitcount[0] >> 3) % SHA256_BLOCK_LENGTH; in SHA256Pad()
575 if (usedspace > 0) { in SHA256Pad()
577 context->buffer[usedspace++] = 0x80; in SHA256Pad()
579 if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) { in SHA256Pad()
581 memset(&context->buffer[usedspace], 0, in SHA256Pad()
582 SHA256_SHORT_BLOCK_LENGTH - usedspace); in SHA256Pad()
584 if (usedspace < SHA256_BLOCK_LENGTH) { in SHA256Pad()
585 memset(&context->buffer[usedspace], 0, in SHA256Pad()
586 SHA256_BLOCK_LENGTH - usedspace); in SHA256Pad()
609 usedspace = 0; in SHA256Pad()
806 size_t freespace, usedspace; in SHA512Update() local
812 usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; in SHA512Update()
813 if (usedspace > 0) { in SHA512Update()
815 freespace = SHA512_BLOCK_LENGTH - usedspace; in SHA512Update()
819 memcpy(&context->buffer[usedspace], data, freespace); in SHA512Update()
826 memcpy(&context->buffer[usedspace], data, len); in SHA512Update()
829 usedspace = freespace = 0; in SHA512Update()
846 usedspace = freespace = 0; in SHA512Update()
853 unsigned int usedspace; in SHA512Pad() local
855 usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; in SHA512Pad()
856 if (usedspace > 0) { in SHA512Pad()
858 context->buffer[usedspace++] = 0x80; in SHA512Pad()
860 if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) { in SHA512Pad()
862 memset(&context->buffer[usedspace], 0, SHA512_SHORT_BLOCK_LENGTH - usedspace); in SHA512Pad()
864 if (usedspace < SHA512_BLOCK_LENGTH) { in SHA512Pad()
865 memset(&context->buffer[usedspace], 0, SHA512_BLOCK_LENGTH - usedspace); in SHA512Pad()
890 usedspace = 0; in SHA512Pad()