Home
last modified time | relevance | path

Searched refs:dec_key (Results 1 – 17 of 17) sorted by relevance

/third_party/mindspore/include/api/
Dserialization.h44 const Key &dec_key = {}, const std::string &dec_mode = kDecModeAesGcm);
55 …c Status Load(const std::string &file, ModelType model_type, Graph *graph, const Key &dec_key = {},
68 const Key &dec_key = {}, const std::string &dec_mode = kDecModeAesGcm);
76 …d(const void *model_data, size_t data_size, ModelType model_type, Graph *graph, const Key &dec_key,
79 … Status Load(const std::vector<char> &file, ModelType model_type, Graph *graph, const Key &dec_key,
82 const Key &dec_key, const std::vector<char> &dec_mode);
86 const Key &dec_key, const std::string &dec_mode) { in Load() argument
87 return Load(model_data, data_size, model_type, graph, dec_key, StringToChar(dec_mode)); in Load()
90 …erialization::Load(const std::string &file, ModelType model_type, Graph *graph, const Key &dec_key, in Load() argument
92 return Load(StringToChar(file), model_type, graph, dec_key, StringToChar(dec_mode)); in Load()
[all …]
Dmodel.h193 const std::shared_ptr<Context> &model_context = nullptr, const Key &dec_key = {},
207 const std::shared_ptr<Context> &model_context = nullptr, const Key &dec_key = {},
Dtypes.h341 explicit Key(const char *dec_key, size_t key_len);
/third_party/mindspore/mindspore/ccsrc/cxx_api/
Dserialization.cc87 Key::Key(const char *dec_key, size_t key_len) { in Key() argument
94 auto sec_ret = memcpy_s(key, max_key_len, dec_key, key_len); in Key()
104 const Key &dec_key, const std::vector<char> &dec_mode) { in Load() argument
115 if (dec_key.len > dec_key.max_key_len) { in Load()
116 err_msg << "The key length exceeds maximum length: " << dec_key.max_key_len; in Load()
119 } else if (dec_key.len == 0) { in Load()
130 … data_size, dec_key.key, dec_key.len, CharToString(dec_mode)); in Load()
160 …zation::Load(const std::vector<char> &file, ModelType model_type, Graph *graph, const Key &dec_key, in Load() argument
177 if (dec_key.len > dec_key.max_key_len) { in Load()
178 err_msg << "The key length exceeds maximum length: " << dec_key.max_key_len; in Load()
[all …]
/third_party/mindspore/mindspore/core/load_mindir/
Dload_model.cc129 … ParseModelProto(mind_ir::ModelProto *model, const std::string &path, const unsigned char *dec_key, in ParseModelProto() argument
131 if (dec_key != nullptr) { in ParseModelProto()
133 auto plain_data = Decrypt(&plain_len, path, dec_key, key_len, dec_mode); in ParseModelProto()
152 … ParseGraphProto(mind_ir::GraphProto *graph, const std::string &path, const unsigned char *dec_key, in ParseGraphProto() argument
154 if (dec_key != nullptr) { in ParseGraphProto()
156 auto plain_data = Decrypt(&plain_len, path, dec_key, key_len, dec_mode); in ParseGraphProto()
203 … const unsigned char *dec_key, const size_t key_len, in LoadMindIRs() argument
208 funcgraph_vec.push_back(LoadMindIR(file_name, is_lite, dec_key, key_len, dec_mode, true)); in LoadMindIRs()
213 …ptr<FuncGraph> LoadMindIR(const std::string &file_name, bool is_lite, const unsigned char *dec_key, in LoadMindIR() argument
231 if (!ParseModelProto(&origin_model, std::string(abs_path_buff), dec_key, key_len, dec_mode)) { in LoadMindIR()
[all …]
Dload_model.h27 … const unsigned char *dec_key = nullptr, const size_t key_len = 0,
30 … const unsigned char *dec_key = nullptr, const size_t key_len = 0,
/third_party/mindspore/mindspore/lite/src/cxx_api/
Dserialization.cc29 Key::Key(const char *dec_key, size_t key_len) { in Key() argument
36 memcpy(key, dec_key, key_len); in Key()
41 const Key &dec_key, const std::vector<char> &dec_mode) { in Load() argument
42 if (dec_key.len != 0 || CharToString(dec_mode) != kDecModeAesGcm) { in Load()
74 …zation::Load(const std::vector<char> &file, ModelType model_type, Graph *graph, const Key &dec_key, in Load() argument
76 if (dec_key.len != 0 || CharToString(dec_mode) != kDecModeAesGcm) { in Load()
110 … std::vector<Graph> *graphs, const Key &dec_key, const std::vector<char> &dec_mode) { in Load() argument
/third_party/mindspore/mindspore/train/
Dserialization.py360 dec_key = Validator.check_isinstance('dec_key', kwargs['dec_key'], bytes)
364 graph = load_mindir(file_name, dec_key=dec_key, key_len=len(dec_key), dec_mode=dec_mode)
376 def load_checkpoint(ckpt_file_name, net=None, strict_load=False, filter_prefix=None, dec_key=None, … argument
409 dec_key = Validator.check_isinstance('dec_key', dec_key, (type(None), bytes))
415 if dec_key is None:
419 pb_content = _decrypt(ckpt_file_name, dec_key, len(dec_key), dec_mode)
1309 … train_strategy_filename=None, strict_load=False, dec_key=None, dec_mode='AES-GCM'): argument
1340 dec_key = Validator.check_isinstance('dec_key', dec_key, (type(None), bytes))
1361 ckpt_dict = load_checkpoint(file_name, dec_key=dec_key, dec_mode=dec_mode)
/third_party/mindspore/mindspore/lite/src/cxx_api/model/
Dmodel.cc32 … const std::shared_ptr<Context> &model_context, const Key &dec_key, const std::string &dec_mode) { in Build() argument
50 const Key &dec_key, const std::string &dec_mode) { in Build() argument
/third_party/mindspore/mindspore/lite/tools/converter/import/
Dmindspore_importer.cc197 if (flag.dec_key.size() != 0) { in ImportMindIR()
199 const size_t key_len = Hex2ByteArray(flag.dec_key, key, 32); in ImportMindIR()
/third_party/mindspore/mindspore/lite/tools/converter/
Dconverter_flags.h88 std::string dec_key = ""; variable
Dconverter_flags.cc69 AddFlag(&Flags::dec_key, "decryptKey", in Flags()
/third_party/mindspore/tests/ut/python/utils/
Dtest_serialize.py343 param_dict = load_checkpoint(ckpt_path, dec_key=key, dec_mode="AES-GCM")
347 param_dict = load_checkpoint(ckpt_path, dec_key=key, dec_mode="AES-GCM")
394 load("./me_cipher_binary_export.mindir", dec_key=key)
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/
Dpipeline.h163 FuncGraphPtr LoadMindIR(const std::string &file_name, char *dec_key, const size_t key_len, const st…
Dpipeline.cc1358 FuncGraphPtr LoadMindIR(const std::string &file_name, char *dec_key, const size_t key_len, in LoadMindIR() argument
1361 …mindspore::LoadMindIR(file_name, false, reinterpret_cast<unsigned char *>(dec_key), key_len, dec_m… in LoadMindIR()
/third_party/openssl/test/
Dbad_dtls_test.c58 #define dec_key (key_block + 40) macro
/third_party/openssl/include/openssl/
Devp.h985 int EVP_PKEY_decrypt_old(unsigned char *dec_key,