我要评分
获取效率
正确性
完整性
易理解

releaseTeeCtx

Releases the MPC context.

void releaseTeeCtx(
    DG_TeeCtx **dgTeeCtx
)

Parameters

Parameter

Description

Value Range

Input/Output

dgTeeCtx

MPC context

It is not null as a single pointer or a double pointer.

Input

Return Values

None

Error Codes

None

Dependency

This function depends on the return result of initTeeCtx and is used together with initTeeCtx.

Example

#include  "data_guard_mpc.h" 
// psmOpts is the result of the successful DG_InitPsmOpts call, and dgTeeCtx is the result of the successful initTeeMpcSql call.
psmOpts.releaseTeeCtx(&dgTeeCtx);

Calculation result: no return value

  • Call the releaseTeeCtx API using the psmOpts output of the successful DG_InitPsmOpts call.
  • This API is used to release resources when the cryptographic computing feature is not used.