Lines Matching refs:usedspace
500 unsigned int freespace, usedspace;
510 usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
511 if (usedspace > 0) {
513 freespace = SHA256_BLOCK_LENGTH - usedspace;
517 bcopy(data, &context->buffer[usedspace], freespace);
524 bcopy(data, &context->buffer[usedspace], len);
527 usedspace = freespace = 0;
544 usedspace = freespace = 0;
549 unsigned int usedspace;
556 usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
561 if (usedspace > 0) {
563 context->buffer[usedspace++] = 0x80;
565 if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) {
567 bzero(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace);
569 if (usedspace < SHA256_BLOCK_LENGTH) {
570 bzero(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace);
607 usedspace = 0;
822 unsigned int freespace, usedspace;
832 usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
833 if (usedspace > 0) {
835 freespace = SHA512_BLOCK_LENGTH - usedspace;
839 bcopy(data, &context->buffer[usedspace], freespace);
846 bcopy(data, &context->buffer[usedspace], len);
849 usedspace = freespace = 0;
866 usedspace = freespace = 0;
870 unsigned int usedspace;
872 usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
878 if (usedspace > 0) {
880 context->buffer[usedspace++] = 0x80;
882 if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) {
884 bzero(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace);
886 if (usedspace < SHA512_BLOCK_LENGTH) {
887 bzero(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace);