mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-20 19:44:46 +00:00
small fixes
This commit is contained in:
parent
f1697b666e
commit
c1e701a2e5
2 changed files with 5 additions and 5 deletions
|
@ -166,7 +166,7 @@ bool PKG::Extract(const std::string& filepath, const std::filesystem::path& extr
|
|||
// Read the seed
|
||||
std::array<CryptoPP::byte, 16> seed;
|
||||
file.Seek(pkgheader.pfs_image_offset + 0x370);
|
||||
file.ReadRaw<u8>(seed.data(), seed.size());
|
||||
file.Read(seed);
|
||||
|
||||
// Get data and tweak keys.
|
||||
PKG::crypto.PfsGenCryptoKey(ekpfsKey, seed, dataKey, tweakKey);
|
||||
|
@ -347,7 +347,7 @@ void PKG::ExtractFiles(const int& index) {
|
|||
int previousData = (sectorOffset + pfsc_offset) - sectorOffsetMask;
|
||||
|
||||
pkgFile.Seek(fileOffset - previousData);
|
||||
pkgFile.ReadRaw<u8>(pfsc.data(), pfsc.size());
|
||||
pkgFile.Read(pfsc);
|
||||
|
||||
PKG::crypto.decryptPFS(dataKey, tweakKey, pfsc, pfs_decrypted, currentSector1);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
FileTypes DetectFileType(const std::string& filepath) {
|
||||
if (filepath.size() == 0) // no file loaded
|
||||
{
|
||||
return FILETYPE_UNKNOWN;
|
||||
return FileTypes::Unknown;
|
||||
}
|
||||
Common::FS::IOFile file;
|
||||
file.Open(filepath, Common::FS::FileAccessMode::Read);
|
||||
|
@ -18,7 +18,7 @@ FileTypes DetectFileType(const std::string& filepath) {
|
|||
file.Close();
|
||||
switch (magic) {
|
||||
case 0x544e437f: // PS4 PKG
|
||||
return FILETYPE_PKG;
|
||||
return FileTypes::Pkg;
|
||||
}
|
||||
return FILETYPE_UNKNOWN;
|
||||
return FileTypes::Unknown;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue