---
title: 基于Context进行Cipher加解密操作
description: "参照基于Context进行Cipher加解密操作，仅添加tag参数，该参数用于任务完成后poll线程中回调函数触发的调用。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/251RC1/accel/kunpengaccel_17_0082.html
sourcePath: /source/zh/kunpengboostkithistory/251RC1/accel/kunpengaccel_17_0082.html
indexId: 5cc1cdf71695200e0a9ea1f6762a016786f7a79bdb1210926dee3065e22bf99072
---
# 基于Context进行Cipher加解密操作

参照基于Context进行Cipher加解密操作，仅添加tag参数，该参数用于任务完成后poll线程中回调函数触发的调用。

```
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);
```
