提交 4ac2f443 编写于 作者: H HexToString

fix code is not strong

上级 ee24d86e
...@@ -107,9 +107,9 @@ class PaddleInferenceEngine : public PaddleEngineBase { ...@@ -107,9 +107,9 @@ class PaddleInferenceEngine : public PaddleEngineBase {
if (engine_conf.has_encrypted_model() && engine_conf.encrypted_model()) { if (engine_conf.has_encrypted_model() && engine_conf.encrypted_model()) {
// decrypt model // decrypt model
std::string model_buffer, params_buffer, key_buffer; std::string model_buffer, params_buffer, key_buffer;
predictor::ReadBinaryFile(model_path + "encrypt_model", &model_buffer); predictor::ReadBinaryFile(model_path + "/encrypt_model", &model_buffer);
predictor::ReadBinaryFile(model_path + "encrypt_params", &params_buffer); predictor::ReadBinaryFile(model_path + "/encrypt_params", &params_buffer);
predictor::ReadBinaryFile(model_path + "key", &key_buffer); predictor::ReadBinaryFile(model_path + "/key", &key_buffer);
auto cipher = paddle::MakeCipher(""); auto cipher = paddle::MakeCipher("");
std::string real_model_buffer = cipher->Decrypt(model_buffer, key_buffer); std::string real_model_buffer = cipher->Decrypt(model_buffer, key_buffer);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册