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

Function command_encrypt_predefined_rc4

lite/tools/rc4_encrypt.cpp:50–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 " rc4_encryptor hash <input file>\n";
49
50int command_encrypt_predefined_rc4(int argc, char** argv) {
51 if (argc != 4) {
52 printf("Invalid encrypt_predefined_rc4 arguments.\n");
53 return 1;
54 }
55
56 const char* input_file_path = argv[2];
57 const char* output_file_path = argv[3];
58
59 size_t size = 0;
60 auto keys = RC4::get_decrypt_key();
61 auto input = read_file(input_file_path, size);
62 printf("Reading input file ...\n");
63 auto output = RC4::encrypt_model(input.get(), size, keys);
64
65 write_file(output_file_path, output);
66
67 printf("Done.\n");
68 return 0;
69}
70
71int command_encrypt_rc4(int argc, char** argv) {
72 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