| 1222 | } |
| 1223 | |
| 1224 | fs::file SELFDecrypter::MakeElf(bool isElf32) |
| 1225 | { |
| 1226 | // Create a new ELF file. |
| 1227 | fs::file e = fs::make_stream<std::vector<u8>>(); |
| 1228 | |
| 1229 | if (isElf32) |
| 1230 | { |
| 1231 | WriteElf(e, elf32_hdr, shdr32_arr, phdr32_arr); |
| 1232 | } |
| 1233 | else |
| 1234 | { |
| 1235 | WriteElf(e, elf64_hdr, shdr64_arr, phdr64_arr); |
| 1236 | } |
| 1237 | |
| 1238 | return e; |
| 1239 | } |
| 1240 | |
| 1241 | bool SELFDecrypter::GetKeyFromRap(const char* content_id, u8* npdrm_key) |
| 1242 | { |