diff options
| author | Zach Hilman <zachhilman@gmail.com> | 2018-11-01 20:22:29 -0400 |
|---|---|---|
| committer | Zach Hilman <zachhilman@gmail.com> | 2018-11-01 20:22:29 -0400 |
| commit | e20db909eeb7dc6670924032e7cbb4add4652908 (patch) | |
| tree | 01c27f3e0dcd4ed34b49a3b410a28004c4de398b /src/core/file_sys/content_archive.cpp | |
| parent | da5fcbf50162c1c152f9d7e2d8b7c5f077f37726 (diff) | |
content_archive: Add optional KeyManager parameter to constructor
Allows resuing a common KeyManager when a large amount of NCAs are handled by the same class. Should the parameter not be provided, a new KeyManager will be constructed, as was the default behavior prior to this.
Diffstat (limited to 'src/core/file_sys/content_archive.cpp')
| -rw-r--r-- | src/core/file_sys/content_archive.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/file_sys/content_archive.cpp b/src/core/file_sys/content_archive.cpp index b46fe893c..19b6f8600 100644 --- a/src/core/file_sys/content_archive.cpp +++ b/src/core/file_sys/content_archive.cpp @@ -101,8 +101,9 @@ static bool IsValidNCA(const NCAHeader& header) { return header.magic == Common::MakeMagic('N', 'C', 'A', '3'); } -NCA::NCA(VirtualFile file_, VirtualFile bktr_base_romfs_, u64 bktr_base_ivfc_offset) - : file(std::move(file_)), bktr_base_romfs(std::move(bktr_base_romfs_)) { +NCA::NCA(VirtualFile file_, VirtualFile bktr_base_romfs_, u64 bktr_base_ivfc_offset, + Core::Crypto::KeyManager keys_) + : file(std::move(file_)), bktr_base_romfs(std::move(bktr_base_romfs_)), keys(std::move(keys_)) { if (file == nullptr) { status = Loader::ResultStatus::ErrorNullFile; return; |
