Lines Matching refs:usedspace
503 size_t freespace, usedspace; in ldns_sha256_update() local
513 usedspace = (context->bitcount >> 3) % LDNS_SHA256_BLOCK_LENGTH; in ldns_sha256_update()
514 if (usedspace > 0) { in ldns_sha256_update()
516 freespace = LDNS_SHA256_BLOCK_LENGTH - usedspace; in ldns_sha256_update()
520 MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace); in ldns_sha256_update()
527 MEMCPY_BCOPY(&context->buffer[usedspace], data, len); in ldns_sha256_update()
530 usedspace = freespace = 0; in ldns_sha256_update()
531 (void)usedspace; in ldns_sha256_update()
548 usedspace = freespace = 0; in ldns_sha256_update()
549 (void)usedspace; in ldns_sha256_update()
559 size_t usedspace; in ldns_sha256_final() local
567 usedspace = (context->bitcount >> 3) % LDNS_SHA256_BLOCK_LENGTH; in ldns_sha256_final()
572 if (usedspace > 0) { in ldns_sha256_final()
574 context->buffer[usedspace++] = 0x80; in ldns_sha256_final()
576 if (usedspace <= ldns_sha256_SHORT_BLOCK_LENGTH) { in ldns_sha256_final()
578 MEMSET_BZERO(&context->buffer[usedspace], ldns_sha256_SHORT_BLOCK_LENGTH - usedspace); in ldns_sha256_final()
580 if (usedspace < LDNS_SHA256_BLOCK_LENGTH) { in ldns_sha256_final()
581 MEMSET_BZERO(&context->buffer[usedspace], LDNS_SHA256_BLOCK_LENGTH - usedspace); in ldns_sha256_final()
619 usedspace = 0; in ldns_sha256_final()
620 (void)usedspace; in ldns_sha256_final()
816 size_t freespace, usedspace; in ldns_sha512_update() local
826 usedspace = (context->bitcount[0] >> 3) % LDNS_SHA512_BLOCK_LENGTH; in ldns_sha512_update()
827 if (usedspace > 0) { in ldns_sha512_update()
829 freespace = LDNS_SHA512_BLOCK_LENGTH - usedspace; in ldns_sha512_update()
833 MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace); in ldns_sha512_update()
840 MEMCPY_BCOPY(&context->buffer[usedspace], data, len); in ldns_sha512_update()
843 usedspace = freespace = 0; in ldns_sha512_update()
844 (void)usedspace; in ldns_sha512_update()
861 usedspace = freespace = 0; in ldns_sha512_update()
862 (void)usedspace; in ldns_sha512_update()
866 size_t usedspace; in ldns_sha512_Last() local
869 usedspace = (context->bitcount[0] >> 3) % LDNS_SHA512_BLOCK_LENGTH; in ldns_sha512_Last()
875 if (usedspace > 0) { in ldns_sha512_Last()
877 context->buffer[usedspace++] = 0x80; in ldns_sha512_Last()
879 if (usedspace <= ldns_sha512_SHORT_BLOCK_LENGTH) { in ldns_sha512_Last()
881 MEMSET_BZERO(&context->buffer[usedspace], ldns_sha512_SHORT_BLOCK_LENGTH - usedspace); in ldns_sha512_Last()
883 if (usedspace < LDNS_SHA512_BLOCK_LENGTH) { in ldns_sha512_Last()
884 MEMSET_BZERO(&context->buffer[usedspace], LDNS_SHA512_BLOCK_LENGTH - usedspace); in ldns_sha512_Last()