AES: Implement seed crypto
This commit is contained in:
@@ -220,6 +220,8 @@ bool Emulator::loadROM(const std::filesystem::path& path) {
|
||||
const std::filesystem::path appDataPath = getAppDataRoot();
|
||||
const std::filesystem::path dataPath = appDataPath / path.filename().stem();
|
||||
const std::filesystem::path aesKeysPath = appDataPath / "sysdata" / "aes_keys.txt";
|
||||
const std::filesystem::path seedDBPath = appDataPath / "sysdata" / "seeddb.bin";
|
||||
|
||||
IOFile::setAppDataDir(dataPath);
|
||||
|
||||
// Open the text file containing our AES keys if it exists. We use the std::filesystem::exists overload that takes an error code param to
|
||||
@@ -229,6 +231,10 @@ bool Emulator::loadROM(const std::filesystem::path& path) {
|
||||
aesEngine.loadKeys(aesKeysPath);
|
||||
}
|
||||
|
||||
if (std::filesystem::exists(seedDBPath, ec) && !ec) {
|
||||
aesEngine.setSeedPath(seedDBPath);
|
||||
}
|
||||
|
||||
kernel.initializeFS();
|
||||
auto extension = path.extension();
|
||||
bool success; // Tracks if we loaded the ROM successfully
|
||||
|
||||
Reference in New Issue
Block a user