Interface Description
The algorithm layer interfaces are classified by algorithm. Currently, the RSA, DH, CoMP, RNG, cipher, Hash, and EC algorithms are supported.
Generally, each algorithm has wcrypto_create_algorithm_name_ctx, wcrypto_do_algorithm_name, wcrypto_algorithm_name_poll, and wcrypto_del_algorithm_name_ctx interfaces and the struct wcrypto_algorithm_name_op_data structure, which are used to apply for algorithm context, perform an algorithm operation to process user-specified data, and release algorithm context. The wcrypto_do_algorithm_name interface supports synchronous and asynchronous invoking through parameters. The wcrypto_algorithm_name_poll is mainly used in asynchronous invoking scenarios. For details about the external APIs and structures provided by each algorithm, see Algorithm Layer Interfaces. The precautions for using these interfaces are described in the following scenarios.
This section uses the Hash algorithm as an example to describe the usage of typical interfaces.