Lines Matching refs:operation
112 mbedtls_psa_hash_operation_t *operation ) in hash_abort() argument
114 switch( operation->alg ) in hash_abort()
123 mbedtls_md5_free( &operation->ctx.md5 ); in hash_abort()
128 mbedtls_ripemd160_free( &operation->ctx.ripemd160 ); in hash_abort()
133 mbedtls_sha1_free( &operation->ctx.sha1 ); in hash_abort()
138 mbedtls_sha256_free( &operation->ctx.sha256 ); in hash_abort()
143 mbedtls_sha256_free( &operation->ctx.sha256 ); in hash_abort()
148 mbedtls_sha512_free( &operation->ctx.sha512 ); in hash_abort()
153 mbedtls_sha512_free( &operation->ctx.sha512 ); in hash_abort()
159 operation->alg = 0; in hash_abort()
164 mbedtls_psa_hash_operation_t *operation, in hash_setup() argument
170 if( operation->alg != 0 ) in hash_setup()
179 mbedtls_md5_init( &operation->ctx.md5 ); in hash_setup()
180 ret = mbedtls_md5_starts( &operation->ctx.md5 ); in hash_setup()
185 mbedtls_ripemd160_init( &operation->ctx.ripemd160 ); in hash_setup()
186 ret = mbedtls_ripemd160_starts( &operation->ctx.ripemd160 ); in hash_setup()
191 mbedtls_sha1_init( &operation->ctx.sha1 ); in hash_setup()
192 ret = mbedtls_sha1_starts( &operation->ctx.sha1 ); in hash_setup()
197 mbedtls_sha256_init( &operation->ctx.sha256 ); in hash_setup()
198 ret = mbedtls_sha256_starts( &operation->ctx.sha256, 1 ); in hash_setup()
203 mbedtls_sha256_init( &operation->ctx.sha256 ); in hash_setup()
204 ret = mbedtls_sha256_starts( &operation->ctx.sha256, 0 ); in hash_setup()
209 mbedtls_sha512_init( &operation->ctx.sha512 ); in hash_setup()
210 ret = mbedtls_sha512_starts( &operation->ctx.sha512, 1 ); in hash_setup()
215 mbedtls_sha512_init( &operation->ctx.sha512 ); in hash_setup()
216 ret = mbedtls_sha512_starts( &operation->ctx.sha512, 0 ); in hash_setup()
225 operation->alg = alg; in hash_setup()
227 hash_abort( operation ); in hash_setup()
292 mbedtls_psa_hash_operation_t *operation, in hash_update() argument
298 switch( operation->alg ) in hash_update()
302 ret = mbedtls_md5_update( &operation->ctx.md5, in hash_update()
308 ret = mbedtls_ripemd160_update( &operation->ctx.ripemd160, in hash_update()
314 ret = mbedtls_sha1_update( &operation->ctx.sha1, in hash_update()
320 ret = mbedtls_sha256_update( &operation->ctx.sha256, in hash_update()
326 ret = mbedtls_sha256_update( &operation->ctx.sha256, in hash_update()
332 ret = mbedtls_sha512_update( &operation->ctx.sha512, in hash_update()
338 ret = mbedtls_sha512_update( &operation->ctx.sha512, in hash_update()
352 mbedtls_psa_hash_operation_t *operation, in hash_finish() argument
359 size_t actual_hash_length = PSA_HASH_LENGTH( operation->alg ); in hash_finish()
376 switch( operation->alg ) in hash_finish()
380 ret = mbedtls_md5_finish( &operation->ctx.md5, hash ); in hash_finish()
385 ret = mbedtls_ripemd160_finish( &operation->ctx.ripemd160, hash ); in hash_finish()
390 ret = mbedtls_sha1_finish( &operation->ctx.sha1, hash ); in hash_finish()
395 ret = mbedtls_sha256_finish( &operation->ctx.sha256, hash ); in hash_finish()
400 ret = mbedtls_sha256_finish( &operation->ctx.sha256, hash ); in hash_finish()
405 ret = mbedtls_sha512_finish( &operation->ctx.sha512, hash ); in hash_finish()
410 ret = mbedtls_sha512_finish( &operation->ctx.sha512, hash ); in hash_finish()
433 mbedtls_psa_hash_operation_t operation = MBEDTLS_PSA_HASH_OPERATION_INIT; in hash_compute() local
438 status = hash_setup( &operation, alg ); in hash_compute()
441 status = hash_update( &operation, input, input_length ); in hash_compute()
444 status = hash_finish( &operation, hash, hash_size, hash_length ); in hash_compute()
449 abort_status = hash_abort( &operation ); in hash_compute()
472 mbedtls_psa_hash_operation_t *operation, in mbedtls_psa_hash_setup() argument
475 return( hash_setup( operation, alg ) ); in mbedtls_psa_hash_setup()
486 mbedtls_psa_hash_operation_t *operation, in mbedtls_psa_hash_update() argument
490 return( hash_update( operation, input, input_length ) ); in mbedtls_psa_hash_update()
494 mbedtls_psa_hash_operation_t *operation, in mbedtls_psa_hash_finish() argument
499 return( hash_finish( operation, hash, hash_size, hash_length ) ); in mbedtls_psa_hash_finish()
503 mbedtls_psa_hash_operation_t *operation ) in mbedtls_psa_hash_abort() argument
505 return( hash_abort( operation ) ); in mbedtls_psa_hash_abort()
567 mbedtls_transparent_test_driver_hash_operation_t *operation, in mbedtls_transparent_test_driver_hash_setup() argument
571 return( hash_setup( operation, alg ) ); in mbedtls_transparent_test_driver_hash_setup()
587 mbedtls_transparent_test_driver_hash_operation_t *operation, in mbedtls_transparent_test_driver_hash_update() argument
591 if( is_hash_accelerated( operation->alg ) ) in mbedtls_transparent_test_driver_hash_update()
592 return( hash_update( operation, input, input_length ) ); in mbedtls_transparent_test_driver_hash_update()
598 mbedtls_transparent_test_driver_hash_operation_t *operation, in mbedtls_transparent_test_driver_hash_finish() argument
603 if( is_hash_accelerated( operation->alg ) ) in mbedtls_transparent_test_driver_hash_finish()
604 return( hash_finish( operation, hash, hash_size, hash_length ) ); in mbedtls_transparent_test_driver_hash_finish()
610 mbedtls_transparent_test_driver_hash_operation_t *operation ) in mbedtls_transparent_test_driver_hash_abort() argument
612 return( hash_abort( operation ) ); in mbedtls_transparent_test_driver_hash_abort()