MCPcopy Create free account
hub / github.com/XiaoMi/mace / encrypt_code

Function encrypt_code

mace/python/tools/encrypt_opencl_codegen.py:31–38  ·  view source on GitHub ↗
(code_str)

Source from the content-addressed store, hash-verified

29
30
31def encrypt_code(code_str):
32 encrypted_arr = []
33 for i in range(len(code_str)):
34 encrypted_char = hex(
35 ord(code_str[i]) ^ ord(
36 encrypt_lookup_table[i % len(encrypt_lookup_table)]))
37 encrypted_arr.append(encrypted_char)
38 return encrypted_arr
39
40
41def create_output_dir(dir_path):

Callers 1

encrypt_opencl_codegenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected