基于Context进行Cipher加解密操作
参照基于Context进行Cipher加解密操作,仅增加tag入参,用于任务完成后,poll线程中回调函数调用的入参。
1 2 3 4 5 6 7 8 9 10 11 12 | struct cipher_async_tag { void *ctx; void *pool; int thread_id; int cnt; } *tag; tag = malloc(sizeof(*tag)); tag->ctx = ctx; tag->thread_id = thread_id; tag->cnt = 0; tag->pool = pool; wd_do_cipher(ctx, &opdata, tag); |
父主题: CIPHER异步接口使用示例