Lines Matching refs:cipher_ctx
130 mbedtls_cipher_context_t cipher_ctx; in main() local
141 mbedtls_cipher_init( &cipher_ctx ); in main()
214 if( ( ret = mbedtls_cipher_setup( &cipher_ctx, cipher_info) ) != 0 ) in main()
343 if( mbedtls_cipher_setkey( &cipher_ctx, digest, cipher_info->key_bitlen, in main()
349 if( mbedtls_cipher_set_iv( &cipher_ctx, IV, 16 ) != 0 ) in main()
354 if( mbedtls_cipher_reset( &cipher_ctx ) != 0 ) in main()
365 for( offset = 0; offset < filesize; offset += mbedtls_cipher_get_block_size( &cipher_ctx ) ) in main()
367 … ilen = ( (unsigned int) filesize - offset > mbedtls_cipher_get_block_size( &cipher_ctx ) ) ? in main()
368 mbedtls_cipher_get_block_size( &cipher_ctx ) : (unsigned int) ( filesize - offset ); in main()
376 if( mbedtls_cipher_update( &cipher_ctx, buffer, ilen, output, &olen ) != 0 ) in main()
391 if( mbedtls_cipher_finish( &cipher_ctx, output, &olen ) != 0 ) in main()
433 if( mbedtls_cipher_get_block_size( &cipher_ctx ) == 0 ) in main()
444 mbedtls_cipher_get_block_size( &cipher_ctx ) ) != 0 ) in main()
447 mbedtls_cipher_get_block_size( &cipher_ctx )); in main()
482 if( mbedtls_cipher_setkey( &cipher_ctx, digest, cipher_info->key_bitlen, in main()
489 if( mbedtls_cipher_set_iv( &cipher_ctx, IV, 16 ) != 0 ) in main()
495 if( mbedtls_cipher_reset( &cipher_ctx ) != 0 ) in main()
506 for( offset = 0; offset < filesize; offset += mbedtls_cipher_get_block_size( &cipher_ctx ) ) in main()
508 … ilen = ( (unsigned int) filesize - offset > mbedtls_cipher_get_block_size( &cipher_ctx ) ) ? in main()
509 mbedtls_cipher_get_block_size( &cipher_ctx ) : (unsigned int) ( filesize - offset ); in main()
514 mbedtls_cipher_get_block_size( &cipher_ctx ) ); in main()
519 if( mbedtls_cipher_update( &cipher_ctx, buffer, ilen, output, in main()
559 mbedtls_cipher_finish( &cipher_ctx, output, &olen ); in main()
588 mbedtls_cipher_free( &cipher_ctx ); in main()