Lines Matching refs:ctx
296 mbedtls_cipher_init(&operation->ctx.cipher);
306 ret = mbedtls_cipher_setup(&operation->ctx.cipher, cipher_info);
317 ret = mbedtls_cipher_setkey(&operation->ctx.cipher,
323 ret = mbedtls_cipher_setkey(&operation->ctx.cipher, key_buffer,
334 ret = mbedtls_cipher_set_padding_mode(&operation->ctx.cipher,
338 ret = mbedtls_cipher_set_padding_mode(&operation->ctx.cipher,
391 mbedtls_cipher_set_iv(&operation->ctx.cipher,
402 * \param ctx The mbedtls cipher context to use. It must have been
408 * it is stored in \p ctx for future processing.
412 * unprocessed partial block in \p ctx (with
420 mbedtls_cipher_context_t *ctx,
427 size_t block_size = mbedtls_cipher_info_get_block_size(ctx->cipher_info);
436 if (ctx->unprocessed_len > 0) {
438 size_t bytes_to_copy = block_size - ctx->unprocessed_len;
444 memcpy(&(ctx->unprocessed_data[ctx->unprocessed_len]),
448 ctx->unprocessed_len += bytes_to_copy;
450 if (ctx->unprocessed_len == block_size) {
452 mbedtls_cipher_update(ctx,
453 ctx->unprocessed_data,
463 ctx->unprocessed_len = 0;
470 mbedtls_cipher_update(ctx, input,
487 memcpy(&(ctx->unprocessed_data[ctx->unprocessed_len]),
489 ctx->unprocessed_len += input_length;
513 (operation->ctx.cipher.unprocessed_len + input_length)
528 status = psa_cipher_update_ecb(&operation->ctx.cipher,
541 mbedtls_cipher_update(&operation->ctx.cipher, input,
559 if (operation->ctx.cipher.unprocessed_len != 0) {
568 mbedtls_cipher_finish(&operation->ctx.cipher,
599 mbedtls_cipher_free(&operation->ctx.cipher);