mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 20:17:56 -05:00
core: implement basic integrity verification
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
@ -132,6 +133,8 @@ enum class ResultStatus : u16 {
|
||||
ErrorBLZDecompressionFailed,
|
||||
ErrorBadINIHeader,
|
||||
ErrorINITooManyKIPs,
|
||||
ErrorIntegrityVerificationNotImplemented,
|
||||
ErrorIntegrityVerificationFailed,
|
||||
};
|
||||
|
||||
std::string GetResultStatusString(ResultStatus status);
|
||||
@ -169,6 +172,13 @@ public:
|
||||
*/
|
||||
virtual LoadResult Load(Kernel::KProcess& process, Core::System& system) = 0;
|
||||
|
||||
/**
|
||||
* Try to verify the integrity of the file.
|
||||
*/
|
||||
virtual ResultStatus VerifyIntegrity(std::function<bool(size_t, size_t)> progress_callback) {
|
||||
return ResultStatus::ErrorIntegrityVerificationNotImplemented;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the code (typically .code section) of the application
|
||||
*
|
||||
|
Reference in New Issue
Block a user