コード例 #1
0
        protected override Result DoOpenFile(out IFile file, U8Span path, OpenMode mode)
        {
            file = default;

            Result rc = BaseFileSystem.OpenFile(out IFile baseFile, path, mode | OpenMode.Read);

            if (rc.IsFailure())
            {
                return(rc);
            }

            var xtsFile = new AesXtsFile(mode, baseFile, path.ToU8String(), KekSource, ValidationKey, BlockSize);

            file = xtsFile;
            return(Result.Success);
        }
コード例 #2
0
ファイル: AesXtsFileSystem.cs プロジェクト: CaitSith2/libhac
        protected override Result OpenFileImpl(out IFile file, string path, OpenMode mode)
        {
            file = default;
            path = PathTools.Normalize(path);

            Result rc = BaseFileSystem.OpenFile(out IFile baseFile, path, mode | OpenMode.Read);

            if (rc.IsFailure())
            {
                return(rc);
            }

            var xtsFile = new AesXtsFile(mode, baseFile, path, KekSource, ValidationKey, BlockSize);

            file = xtsFile;
            return(Result.Success);
        }