mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-28 08:56:43 +00:00
See merge request [ryubing/ryujinx!33](https://git.ryujinx.app/ryubing/ryujinx/-/merge_requests/33)
28 lines
924 B
C#
28 lines
924 B
C#
using LibHac;
|
|
using LibHac.Common;
|
|
using LibHac.Fs;
|
|
using LibHac.Fs.Fsa;
|
|
using LibHac.FsSrv.FsCreator;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace Ryujinx.HLE.FileSystem
|
|
{
|
|
public class EncryptedFileSystemCreator : IEncryptedFileSystemCreator
|
|
{
|
|
public Result Create(ref SharedRef<IFileSystem> outEncryptedFileSystem,
|
|
ref readonly 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.Ref);
|
|
|
|
return Result.Success;
|
|
}
|
|
}
|
|
}
|