昇腾社区首页
中文
注册
开发者
下载

tft_register_decrypt_handler

接口功能

如果用户开启TLS加密,则需要使用该接口注册私钥口令解密函数。

接口格式

mindio_ttp.framework_ttp.tft_register_decrypt_handler(decryptor: Callable)

接口参数

参数

是否必选

说明

取值要求

decryptor

必选

用户自定义的私钥口令解密函数。

通过tft_start_controller和tft_init_processor配置TLS加密,并且如果口令为密文,则需注册解密函数。具体配置指导见导入TLS证书

回调函数参数

参数

是否必选

说明

取值要求

cipherText

-

需要解密的私钥口令。

由注册方决定。

回调函数返回值为plainText : str,即解密后的私钥口令。

返回值

无返回值。出错时会打印ERROR日志并抛出异常。