Lines Matching defs:sw
87 swcr_encdec(struct cryptodesc *crd, const struct swcr_data *sw, void *bufv,
97 exf = sw->sw_exf;
112 exf->reinit(sw->sw_kschedule, iv, 0);
114 exf->reinit(sw->sw_kschedule, 0, iv);
133 exf->reinit(sw->sw_kschedule, iv, 0);
143 exf->encrypt(sw->sw_kschedule, buf + i);
145 exf->decrypt(sw->sw_kschedule, buf + i);
158 exf->encrypt(sw->sw_kschedule, buf + i);
167 exf->decrypt(sw->sw_kschedule, buf + i);
201 exf->encrypt(sw->sw_kschedule,
204 exf->decrypt(sw->sw_kschedule,
212 exf->encrypt(sw->sw_kschedule, blk);
230 exf->decrypt(sw->sw_kschedule, blk);
279 exf->encrypt(sw->sw_kschedule,
282 exf->decrypt(sw->sw_kschedule,
290 exf->encrypt(sw->sw_kschedule, idat);
302 exf->decrypt(sw->sw_kschedule, idat);
344 exf->encrypt(sw->sw_kschedule,
347 exf->decrypt(sw->sw_kschedule,
355 exf->encrypt(sw->sw_kschedule, blk);
373 exf->decrypt(sw->sw_kschedule, blk);
413 exf->encrypt(sw->sw_kschedule,
416 exf->decrypt(sw->sw_kschedule,
424 exf->encrypt(sw->sw_kschedule, idat);
436 exf->decrypt(sw->sw_kschedule, idat);
466 const struct swcr_data *sw, void *buf, int outtype)
473 if (sw->sw_ictx == 0)
476 axf = sw->sw_axf;
478 memcpy(&ctx, sw->sw_ictx, axf->ctxsize);
504 switch (sw->sw_alg) {
514 if (sw->sw_octx == NULL)
518 memcpy(&ctx, sw->sw_octx, axf->ctxsize);
525 if (sw->sw_octx == NULL)
528 axf->Update(&ctx, sw->sw_octx, sw->sw_klen);
571 struct swcr_data *sw, *swa, *swe = NULL;
579 for (sw = swcr_sessions[crp->crp_sid & 0xffffffff];
580 sw && sw->sw_alg != crd->crd_alg;
581 sw = sw->sw_next)
583 if (sw == NULL)
586 switch (sw->sw_alg) {
589 swe = sw;
597 swa = sw;
700 swcr_compdec(struct cryptodesc *crd, const struct swcr_data *sw,
708 cxf = sw->sw_cxf;
736 sw->sw_alg == CRYPTO_DEFLATE_COMP_NOGROW &&
1144 struct swcr_data *sw;
1183 for (sw = swcr_sessions[lid];
1184 sw && sw->sw_alg != crd->crd_alg;
1185 sw = sw->sw_next)
1189 if (sw == NULL) {
1194 switch (sw->sw_alg) {
1203 if ((crp->crp_etype = swcr_encdec(crd, sw,
1225 if ((crp->crp_etype = swcr_authcompute(crp, crd, sw,
1241 DPRINTF("compdec for %d\n", sw->sw_alg);
1242 if ((crp->crp_etype = swcr_compdec(crd, sw,