0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-24 00:25:48 +00:00
Ryujinx/Ryujinx.HLE/FileSystem/EncryptedFileSystemCreator.cs
Alex Barney aa932a6df1
Update to LibHac v0.14.3 (#2925)
* Update to LibHac v0.14.3

* Fix loading NCAs that don't have a data partition
2021-12-23 13:55:50 -03:00

27 lines
875 B
C#

using LibHac;
using LibHac.Common;
using LibHac.Fs;
using LibHac.Fs.Fsa;
using LibHac.FsSrv.FsCreator;
namespace Ryujinx.HLE.FileSystem
{
public class EncryptedFileSystemCreator : IEncryptedFileSystemCreator
{
public Result Create(ref SharedRef<IFileSystem> outEncryptedFileSystem,
ref SharedRef<IFileSystem> baseFileSystem, IEncryptedFileSystemCreator.KeyId idIndex,
in EncryptionSeed encryptionSeed)
{
if (idIndex < IEncryptedFileSystemCreator.KeyId.Save || idIndex > IEncryptedFileSystemCreator.KeyId.CustomStorage)
{
return ResultFs.InvalidArgument.Log();
}
// Todo: Reenable when AesXtsFileSystem is fixed
outEncryptedFileSystem = SharedRef<IFileSystem>.CreateMove(ref baseFileSystem);
return Result.Success;
}
}
}