Lines Matching refs:operation

441     psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
465 PSA_ASSERT( psa_cipher_encrypt_setup( &operation, key, alg ) );
469 PSA_ASSERT( psa_cipher_set_iv( &operation, output1, iv_size ) );
473 PSA_ASSERT( psa_cipher_update( &operation,
481 PSA_ASSERT( psa_cipher_finish( &operation,
491 PSA_ASSERT( psa_cipher_abort( &operation ) );
498 psa_cipher_abort( &operation );
534 psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
539 /* Test operation initialization */
549 operation.ctx.mbedtls_ctx = mbedtls_operation;
550 operation.ctx.transparent_test_driver_ctx = tranparent_operation;
551 operation.ctx.opaque_test_driver_ctx = opaque_operation;
562 PSA_ASSERT( psa_cipher_encrypt_setup( &operation, key, alg ) );
566 PSA_ASSERT( psa_cipher_set_iv( &operation, iv->x, iv->len ) );
581 PSA_ASSERT( psa_cipher_update( &operation, input->x, first_part_size,
592 PSA_ASSERT( psa_cipher_update( &operation,
611 status = psa_cipher_finish( &operation,
623 PSA_ASSERT( psa_cipher_abort( &operation ) );
631 psa_cipher_abort( &operation );
666 psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
671 /* Test operation initialization */
681 operation.ctx.mbedtls_ctx = mbedtls_operation;
682 operation.ctx.transparent_test_driver_ctx = tranparent_operation;
683 operation.ctx.opaque_test_driver_ctx = opaque_operation;
694 PSA_ASSERT( psa_cipher_decrypt_setup( &operation, key, alg ) );
698 PSA_ASSERT( psa_cipher_set_iv( &operation, iv->x, iv->len ) );
713 PSA_ASSERT( psa_cipher_update( &operation,
725 PSA_ASSERT( psa_cipher_update( &operation,
744 status = psa_cipher_finish( &operation,
756 PSA_ASSERT( psa_cipher_abort( &operation ) );
764 psa_cipher_abort( &operation );
859 psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
877 status = psa_cipher_encrypt_setup( &operation, key, alg );
882 status = psa_cipher_set_iv( &operation, iv->x, iv->len );
887 status = psa_cipher_decrypt_setup( &operation, key, alg );
892 status = psa_cipher_set_iv( &operation, iv->x, iv->len );
898 status = psa_cipher_encrypt_setup( &operation, key, alg );
904 status = psa_cipher_set_iv( &operation, iv->x, iv->len );
910 status = psa_cipher_update( &operation,
916 psa_cipher_abort( &operation );
920 status = psa_cipher_encrypt_setup( &operation, key, alg );
926 status = psa_cipher_generate_iv( &operation, output, 16, &function_output_length );
932 status = psa_cipher_update( &operation,
938 psa_cipher_abort( &operation );
942 status = psa_cipher_encrypt_setup( &operation, key, alg );
947 status = psa_cipher_set_iv( &operation, iv->x, iv->len );
953 status = psa_cipher_update( &operation,
962 status = psa_cipher_update( &operation,
968 psa_cipher_abort( &operation );
972 status = psa_cipher_encrypt_setup( &operation, key, alg );
977 status = psa_cipher_set_iv( &operation, iv->x, iv->len );
982 status = psa_cipher_update( &operation,
991 status = psa_cipher_finish( &operation,
1000 status = psa_cipher_update( &operation,
1006 psa_cipher_abort( &operation );
1009 psa_cipher_abort( &operation );
1161 psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
1212 status = psa_mac_sign_setup( &operation, key, alg );
1223 status = psa_mac_update( &operation,
1237 status = psa_mac_sign_finish( &operation,
1253 PSA_ASSERT( psa_mac_abort( &operation ) );
1269 psa_mac_abort( &operation );
1288 psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
1328 status = psa_mac_verify_setup( &operation, key, alg );
1339 status = psa_mac_update( &operation,
1354 status = psa_mac_verify_finish( &operation,
1371 PSA_ASSERT( psa_mac_abort( &operation ) );
1378 psa_mac_abort( &operation );
1535 psa_hash_operation_t operation = PSA_HASH_OPERATION_INIT;
1544 TEST_EQUAL( psa_hash_setup( &operation, alg ), expected_status );
1550 PSA_ASSERT( psa_hash_update( &operation, input->x, input->len ) );
1555 PSA_ASSERT( psa_hash_finish( &operation,
1566 psa_hash_abort( &operation );
1581 psa_hash_operation_t operation = PSA_HASH_OPERATION_INIT;
1590 * Update inactive operation, the driver shouldn't be called.
1592 TEST_EQUAL( psa_hash_update( &operation, input->x, input->len ),
1596 PSA_ASSERT( psa_hash_setup( &operation, alg ) );
1601 TEST_EQUAL( psa_hash_update( &operation, input->x, input->len ),
1611 PSA_ASSERT( psa_hash_finish( &operation,
1622 psa_hash_abort( &operation );
1637 psa_hash_operation_t operation = PSA_HASH_OPERATION_INIT;
1646 * Finish inactive operation, the driver shouldn't be called.
1648 TEST_EQUAL( psa_hash_finish( &operation, output, PSA_HASH_LENGTH( alg ),
1653 PSA_ASSERT( psa_hash_setup( &operation, alg ) );
1657 PSA_ASSERT( psa_hash_update( &operation, input->x, input->len ) );
1662 TEST_EQUAL( psa_hash_finish( &operation,
1674 psa_hash_abort( &operation );
1699 * Clone inactive operation, the driver shouldn't be called.