MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / command_encrypt_predefined_sfrc4

Function command_encrypt_predefined_sfrc4

lite/tools/rc4_encrypt.cpp:99–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99int command_encrypt_predefined_sfrc4(int argc, char** argv) {
100 if (argc != 4) {
101 printf("Invalid encrypt_predefined_rc4 arguments.\n");
102 return 1;
103 }
104
105 const char* input_file_path = argv[2];
106 const char* output_file_path = argv[3];
107
108 size_t size = 0;
109 auto keys = SimpleFastRC4::get_decrypt_key();
110 auto input = read_file(input_file_path, size);
111 printf("Reading input file ...\n");
112 auto output = SimpleFastRC4::encrypt_model(input.get(), size, keys);
113
114 write_file(output_file_path, output);
115
116 printf("Done.\n");
117 return 0;
118}
119
120int command_encrypt_sfrc4(int argc, char** argv) {
121 if (argc != 6) {

Callers

nothing calls this directly

Calls 3

write_fileFunction · 0.85
read_fileFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected