
# 模型加密（可选）
HiLens Kit支持模型加密，模型加密后，仅支持HiLens Framework接口调用。
#### 模型加密操作
下载加密工具：[crypto_tool](https://hilens-framework-sdk-demo.obs.cn-north-1.myhuaweicloud.com/sdk/crypto_tool)，并拷贝到设备系统的"/tmp"目录下，赋予执行权限：
```
chmod +x crypto_tool
```
使用方法请参见工具的帮助信息：
```
./crypto_tool
./crypto_tool encode --model_file plainModelfile --cipher_file cipherModelfile
```
其中"model_file"为待加密模型文件，"cipher_file"为加密之后的模型文件。
#### 接口调用
和未加密模型一样调用接口，详情请见：
- [创建模型实例](https://support.huaweicloud.com/devg-hilens/hilens_05_0019.html)
- [模型推理](https://support.huaweicloud.com/devg-hilens/hilens_05_0020.html)
- [示例-模型管理](https://support.huaweicloud.com/devg-hilens/hilens_05_0021.html)
 
