- void ahash_request_set_callback(struct ahash_request * req, u32 flags, crypto_completion_t compl, void * data);
- request handle
- specify zero or an ORing of the flags CRYPTO_TFM_REQ_MAY_BACKLOG the request queue may back log and increase the wait queue beyond the initial maximum size; CRYPTO_TFM_REQ_MAY_SLEEP the request processing may sleep
- callback function pointer to be registered with the request handle
- The data pointer refers to memory that is not used by the kernel crypto API, but provided to the callback function for it to use. Here, the caller can provide a reference to memory the callback function can operate on. As the callback function is invoked asynchronously to the related functionality, it may need to access data structures of the related functionality which can be referenced using this pointer. The callback function can access the memory via the "data" field in the crypto_async_request data structure provided to the callback function.
This function allows setting the callback function that is triggered once the cipher operation completes.
The callback function is registered with the ahash_request handle and must comply with the following template
void callback_function(struct crypto_async_request *req, int error)