Lines Matching refs:inlen

105 	size_t inlen, outlen, todo;  in swcr_encdec()  local
160 inlen = outlen = 0; in swcr_encdec()
162 if (inlen == 0) in swcr_encdec()
163 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_encdec()
172 if (inlen < blksz) { in swcr_encdec()
175 inlen = blksz; in swcr_encdec()
182 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), blksz); in swcr_encdec()
190 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_encdec()
193 inlen -= todo; in swcr_encdec()
214 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_encdec()
216 if (inlen < resid) { in swcr_encdec()
410 size_t inlen, outlen, todo; in swcr_gcm() local
440 inlen = rounddown2(crp->crp_aad_length, blksz); in swcr_gcm()
441 if (inlen != 0) in swcr_gcm()
442 exf->update(ctx, crp->crp_aad, inlen); in swcr_gcm()
443 if (crp->crp_aad_length != inlen) { in swcr_gcm()
445 memcpy(blk, (char *)crp->crp_aad + inlen, in swcr_gcm()
446 crp->crp_aad_length - inlen); in swcr_gcm()
453 resid -= inlen) { in swcr_gcm()
454 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_gcm()
455 if (inlen >= blksz) { in swcr_gcm()
456 inlen = rounddown2(MIN(inlen, resid), blksz); in swcr_gcm()
457 crypto_cursor_advance(&cc_in, inlen); in swcr_gcm()
459 inlen = blksz; in swcr_gcm()
460 crypto_cursor_copydata(&cc_in, inlen, blk); in swcr_gcm()
463 exf->update(ctx, inblk, inlen); in swcr_gcm()
481 inlen = outlen = 0; in swcr_gcm()
483 if (inlen == 0) in swcr_gcm()
484 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_gcm()
488 if (inlen < blksz) { in swcr_gcm()
491 inlen = blksz; in swcr_gcm()
500 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_gcm()
515 todo = rounddown2(MIN(resid, inlen), blksz); in swcr_gcm()
520 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_gcm()
523 inlen -= todo; in swcr_gcm()
562 inlen = 0; in swcr_gcm()
565 if (inlen == 0) in swcr_gcm()
566 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_gcm()
569 if (inlen < blksz) { in swcr_gcm()
572 inlen = blksz; in swcr_gcm()
579 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_gcm()
585 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_gcm()
588 inlen -= todo; in swcr_gcm()
744 size_t inlen, outlen, todo; in swcr_ccm() local
811 inlen = outlen = 0; in swcr_ccm()
813 if (inlen == 0) in swcr_ccm()
814 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_ccm()
818 if (inlen < blksz) { in swcr_ccm()
821 inlen = blksz; in swcr_ccm()
830 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_ccm()
859 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_ccm()
862 inlen -= todo; in swcr_ccm()
897 inlen = 0; in swcr_ccm()
900 if (inlen == 0) in swcr_ccm()
901 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_ccm()
906 if (inlen < blksz) { in swcr_ccm()
909 inlen = blksz; in swcr_ccm()
916 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_ccm()
922 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_ccm()
925 inlen -= todo; in swcr_ccm()
969 size_t inlen, outlen, todo; in swcr_chacha20_poly1305() local
1018 inlen = outlen = 0; in swcr_chacha20_poly1305()
1022 if (inlen == 0) in swcr_chacha20_poly1305()
1023 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_chacha20_poly1305()
1028 if (inlen < blksz) { in swcr_chacha20_poly1305()
1031 inlen = blksz; in swcr_chacha20_poly1305()
1039 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_chacha20_poly1305()
1046 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_chacha20_poly1305()
1049 inlen -= todo; in swcr_chacha20_poly1305()
1102 inlen = 0; in swcr_chacha20_poly1305()
1105 if (inlen == 0) in swcr_chacha20_poly1305()
1106 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_chacha20_poly1305()
1110 if (inlen < blksz) { in swcr_chacha20_poly1305()
1113 inlen = blksz; in swcr_chacha20_poly1305()
1120 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_chacha20_poly1305()
1126 inblk = crypto_cursor_segment(&cc_in, &inlen); in swcr_chacha20_poly1305()
1129 inlen -= todo; in swcr_chacha20_poly1305()