Update method parameters and rewrite the method to use SaveDataSharedFileStorage.
SaveDataFileSystemCreator now requires a FileSystemServer at construction time, so DefaultFsServerObjects must be created after FileSystemServer construction but before FileSystemServer initialization.
Skeleton most of the remaining methods in SaveDataManagement.
Implement the methods directly reading and writing save data extra data.
Add PosixTime.cs
FS shim macros now call nn::fs::detail::LogResultErrorMessage before aborting instead of nn::fs::detail::LogErrorMessage
Adds ReadSaveDataFileSystemExtraData and WriteSaveDataFileSystemExtraData
Auto-format SaveDataFileSystemServiceImpl
Use SdkRecursiveMutexType instead of SdkRecursiveMutex in SaveDataExtraDataAccessorCacheManager
- Add case-sensitive mode.
- Avoid TargetLocked results by waiting and retrying a few times.
- Allow getting either windows or unix timestamps.
- Try a finite number of times if an entry has been deleted before returning TargetLocked.
Mostly imitates nnsdk's assert system. The assert handler object is global because passing around a HorizonClient object just to do asserts would be annoying
Use this function in all places out values that set in the original code because of errors. Unmanaged values will stay uninitialized while managed values will be zeroed.
ReSharper 2020.Something modified the var style again so that arrays of built-in types also count as built-in types, meaning the type should always be explicit.
Renames the IsEmpty() functions that check if an array is all zeros. This helps avoid confusion because Span has an IsEmpty property that returns true if the span's length is 0.
The change actually revealed a tiny bug in KeyDerivation where the property was accidentally used instead of the function.
Embedded keys are generated at build-time from the IncludedKeys.txt file under the build directory.
A separate codegen build project was created because generating the embedded keys requires the same LibHac that is being built.
_buildCodeGen.csproj is located under CodeGen because NUKE doesn't like having two build projects in the same directory.
- Fully span-ify CalculateCmac and update callers.
- Modify CalculateCmac signature to match Nintendo's.
- Avoid doing stackalloc based on an input length parameter.
- Use ReadOnlySpan instead of Span where appropriate.
- Standardize XML comments to use triple slashes.
- Make use of the entire rented buffer when copying.
Unrelated to the PR
- Slip in a missed enum to string conversion in hactoolnet for CoreRT reflection-free mode.
- Remove AES functions and replace references with functions from the Crypto.Aes class
- Edit and move the AES-CMAC function into the Crypto.Aes class
- Move BigInteger functions to the Utilities class
- Reduce duplication between the RSA functions
- Edit and move the Rsa parameter recovery function into the Crypto.Rsa class
- Store IServiceObjects in the service manager that return the usable objects instead of storing the objects directly
- Register FS services in the service manager instead of giving them special treatment
- Give each created HorizonClient its own "process ID"
Use the version in the .csproj if there is no local git repository.
Always use Windows line endings in codegen output.
Update build dependency versions. We're still using GitVersion 5.1.3 because of https://github.com/nuke-build/nuke/issues/509.
Any operation that is supported with other NCAs is supported NCA0s. This includes reading both encrypted and decrypted NCA0s, and encrypting and decrypting NCA0s.
FS 10.0 tweaks how the SaveDataIndexerManager is accessed. SaveDataFileSystemServiceImpl's configuration now includes an ISaveDataIndexerManager instead of using global state.
FS 10.0 uses the new nn::fssrv::storage namespace for abstracting the interface to nn::gc and nn::sdmmc. A tiny bit of the namespace has been added so we can create mock SD card handles for SaveDataIndexerManager.
ReferenceCountedDisposable<T> is now being used for returning ISaveDataInfoReader objects from IFileSystemProxy. I've tried coming up with a pattern to cleanly return a ReferenceCountedDisposable<T>, but the lack of features like RAII or move semantics makes this difficult without either lots of allocations or lots of boilerplate code.
Allows opening decrypted NCAs.
Allows opening encrypted and decrypted storages of any NCA, whether encrypted or decrypted.
hactoolnet: Allow saving an encrypted version of any NCA.
This class is meant to be used in the same types of places std::shared_ptr is used but with manual instead of automatic ref counting.
SubStorage now uses the class to optionally dispose its base storage object.
This allows over 40% of the CoreRT native binary size to be removed by removing reflection capabilities.
The "--noreflection" option for the build script can be used to build hactoolnet with no reflection.
The Linux build won't always work because creating a new thread for the progress bar runs into some issue with EventSource being removed.