Lines Matching refs:todo

106 	size_t inlen, outlen, todo;  in swcr_encdec()  local
162 for (resid = crp->crp_payload_length; resid >= blksz; resid -= todo) { in swcr_encdec()
183 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), blksz); in swcr_encdec()
186 exf->encrypt_multi(ctx, inblk, outblk, todo); in swcr_encdec()
188 exf->decrypt_multi(ctx, inblk, outblk, todo); in swcr_encdec()
193 crypto_cursor_advance(&cc_in, todo); in swcr_encdec()
194 inlen -= todo; in swcr_encdec()
195 inblk += todo; in swcr_encdec()
202 crypto_cursor_advance(&cc_out, todo); in swcr_encdec()
203 outlen -= todo; in swcr_encdec()
204 outblk += todo; in swcr_encdec()
411 size_t inlen, outlen, todo; in swcr_gcm() local
483 for (resid = crp->crp_payload_length; resid >= blksz; resid -= todo) { in swcr_gcm()
501 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_gcm()
504 exf->encrypt_multi(ctx, inblk, outblk, todo); in swcr_gcm()
505 exf->update(ctx, outblk, todo); in swcr_gcm()
511 crypto_cursor_advance(&cc_out, todo); in swcr_gcm()
512 outlen -= todo; in swcr_gcm()
513 outblk += todo; in swcr_gcm()
516 todo = rounddown2(MIN(resid, inlen), blksz); in swcr_gcm()
517 exf->update(ctx, inblk, todo); in swcr_gcm()
523 crypto_cursor_advance(&cc_in, todo); in swcr_gcm()
524 inlen -= todo; in swcr_gcm()
525 inblk += todo; in swcr_gcm()
565 resid -= todo) { in swcr_gcm()
580 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_gcm()
583 exf->decrypt_multi(ctx, inblk, outblk, todo); in swcr_gcm()
588 crypto_cursor_advance(&cc_in, todo); in swcr_gcm()
589 inlen -= todo; in swcr_gcm()
590 inblk += todo; in swcr_gcm()
598 crypto_cursor_advance(&cc_out, todo); in swcr_gcm()
599 outlen -= todo; in swcr_gcm()
600 outblk += todo; in swcr_gcm()
745 size_t inlen, outlen, todo; in swcr_ccm() local
813 for (resid = crp->crp_payload_length; resid >= blksz; resid -= todo) { in swcr_ccm()
831 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_ccm()
834 exf->update(ctx, inblk, todo); in swcr_ccm()
835 exf->encrypt_multi(ctx, inblk, outblk, todo); in swcr_ccm()
841 crypto_cursor_advance(&cc_out, todo); in swcr_ccm()
842 outlen -= todo; in swcr_ccm()
843 outblk += todo; in swcr_ccm()
854 todo = blksz; in swcr_ccm()
856 exf->update(ctx, blk, todo); in swcr_ccm()
862 crypto_cursor_advance(&cc_in, todo); in swcr_ccm()
863 inlen -= todo; in swcr_ccm()
864 inblk += todo; in swcr_ccm()
900 resid -= todo) { in swcr_ccm()
917 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_ccm()
920 exf->decrypt_multi(ctx, inblk, outblk, todo); in swcr_ccm()
925 crypto_cursor_advance(&cc_in, todo); in swcr_ccm()
926 inlen -= todo; in swcr_ccm()
927 inblk += todo; in swcr_ccm()
935 crypto_cursor_advance(&cc_out, todo); in swcr_ccm()
936 outlen -= todo; in swcr_ccm()
937 outblk += todo; in swcr_ccm()
970 size_t inlen, outlen, todo; in swcr_chacha20_poly1305() local
1022 resid -= todo) { in swcr_chacha20_poly1305()
1040 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_chacha20_poly1305()
1043 exf->encrypt_multi(ctx, inblk, outblk, todo); in swcr_chacha20_poly1305()
1044 exf->update(ctx, outblk, todo); in swcr_chacha20_poly1305()
1049 crypto_cursor_advance(&cc_in, todo); in swcr_chacha20_poly1305()
1050 inlen -= todo; in swcr_chacha20_poly1305()
1051 inblk += todo; in swcr_chacha20_poly1305()
1058 crypto_cursor_advance(&cc_out, todo); in swcr_chacha20_poly1305()
1059 outlen -= todo; in swcr_chacha20_poly1305()
1060 outblk += todo; in swcr_chacha20_poly1305()
1105 resid -= todo) { in swcr_chacha20_poly1305()
1121 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), in swcr_chacha20_poly1305()
1124 exf->decrypt_multi(ctx, inblk, outblk, todo); in swcr_chacha20_poly1305()
1129 crypto_cursor_advance(&cc_in, todo); in swcr_chacha20_poly1305()
1130 inlen -= todo; in swcr_chacha20_poly1305()
1131 inblk += todo; in swcr_chacha20_poly1305()
1139 crypto_cursor_advance(&cc_out, todo); in swcr_chacha20_poly1305()
1140 outlen -= todo; in swcr_chacha20_poly1305()
1141 outblk += todo; in swcr_chacha20_poly1305()