Lines Matching refs:usedspace
458 size_t freespace, usedspace; in SHA256_Update() local
464 usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH; in SHA256_Update()
465 if (usedspace > 0) { in SHA256_Update()
467 freespace = SHA256_BLOCK_LENGTH - usedspace; in SHA256_Update()
471 memcpy(&context->buffer[usedspace], data, freespace); in SHA256_Update()
478 memcpy(&context->buffer[usedspace], data, len); in SHA256_Update()
481 usedspace = freespace = 0; in SHA256_Update()
498 usedspace = freespace = 0; in SHA256_Update()
504 unsigned int usedspace; in SHA256_Pad() local
506 usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH; in SHA256_Pad()
507 if (usedspace > 0) { in SHA256_Pad()
509 context->buffer[usedspace++] = 0x80; in SHA256_Pad()
511 if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) { in SHA256_Pad()
513 memset(&context->buffer[usedspace], 0, in SHA256_Pad()
514 SHA256_SHORT_BLOCK_LENGTH - usedspace); in SHA256_Pad()
516 if (usedspace < SHA256_BLOCK_LENGTH) { in SHA256_Pad()
517 memset(&context->buffer[usedspace], 0, in SHA256_Pad()
518 SHA256_BLOCK_LENGTH - usedspace); in SHA256_Pad()
541 usedspace = 0; in SHA256_Pad()
739 size_t freespace, usedspace; in SHA512_Update() local
745 usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; in SHA512_Update()
746 if (usedspace > 0) { in SHA512_Update()
748 freespace = SHA512_BLOCK_LENGTH - usedspace; in SHA512_Update()
752 memcpy(&context->buffer[usedspace], data, freespace); in SHA512_Update()
759 memcpy(&context->buffer[usedspace], data, len); in SHA512_Update()
762 usedspace = freespace = 0; in SHA512_Update()
779 usedspace = freespace = 0; in SHA512_Update()
785 unsigned int usedspace; in SHA512_Pad() local
787 usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; in SHA512_Pad()
788 if (usedspace > 0) { in SHA512_Pad()
790 context->buffer[usedspace++] = 0x80; in SHA512_Pad()
792 if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) { in SHA512_Pad()
794 memset(&context->buffer[usedspace], 0, SHA512_SHORT_BLOCK_LENGTH - usedspace); in SHA512_Pad()
796 if (usedspace < SHA512_BLOCK_LENGTH) { in SHA512_Pad()
797 memset(&context->buffer[usedspace], 0, SHA512_BLOCK_LENGTH - usedspace); in SHA512_Pad()
822 usedspace = 0; in SHA512_Pad()