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); }
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); }