Lines Matching refs:use_len
124 size_t offset, size_t use_len, in mbedtls_ccm_crypt() argument
143 mbedtls_xor(output, input, tmp_buf + offset, use_len); in mbedtls_ccm_crypt()
295 size_t use_len, offset; in mbedtls_ccm_update_ad() local
325 use_len = 16 - offset; in mbedtls_ccm_update_ad()
327 if (use_len > add_len) { in mbedtls_ccm_update_ad()
328 use_len = add_len; in mbedtls_ccm_update_ad()
331 mbedtls_xor(ctx->y + offset, ctx->y + offset, add, use_len); in mbedtls_ccm_update_ad()
333 ctx->processed += use_len; in mbedtls_ccm_update_ad()
334 add_len -= use_len; in mbedtls_ccm_update_ad()
335 add += use_len; in mbedtls_ccm_update_ad()
337 if (use_len + offset == 16 || ctx->processed == ctx->add_len) { in mbedtls_ccm_update_ad()
366 size_t use_len, offset; in mbedtls_ccm_update() local
394 use_len = 16 - offset; in mbedtls_ccm_update()
396 if (use_len > input_len) { in mbedtls_ccm_update()
397 use_len = input_len; in mbedtls_ccm_update()
400 ctx->processed += use_len; in mbedtls_ccm_update()
404 mbedtls_xor(ctx->y + offset, ctx->y + offset, input, use_len); in mbedtls_ccm_update()
406 if (use_len + offset == 16 || ctx->processed == ctx->plaintext_len) { in mbedtls_ccm_update()
418 ret = mbedtls_ccm_crypt(ctx, offset, use_len, input, output); in mbedtls_ccm_update()
432 ret = mbedtls_ccm_crypt(ctx, offset, use_len, input, local_output); in mbedtls_ccm_update()
437 mbedtls_xor(ctx->y + offset, ctx->y + offset, local_output, use_len); in mbedtls_ccm_update()
439 memcpy(output, local_output, use_len); in mbedtls_ccm_update()
441 if (use_len + offset == 16 || ctx->processed == ctx->plaintext_len) { in mbedtls_ccm_update()
454 if (use_len + offset == 16 || ctx->processed == ctx->plaintext_len) { in mbedtls_ccm_update()
462 input_len -= use_len; in mbedtls_ccm_update()
463 input += use_len; in mbedtls_ccm_update()
464 output += use_len; in mbedtls_ccm_update()