summaryrefslogtreecommitdiffstats
path: root/src/core/crypto/partition_data_manager.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* crypto: Use compressed sizes in offset calculation for KIP decompressionZach Hilman2018-10-201-1/+2
| | | | Fixes a fatal crash on start when deriving keys.
* crypto: Various crypto fixes for quickstart guideZach Hilman2018-10-151-2/+2
|
* partition_data_manager: Reserve and insert data within output vector in DecryptPackage2()Lioncash2018-10-131-20/+16
| | | | | | | | | | | | | | | | | | We can just reserve the memory then perform successive insertions instead of needing to use memcpy. This also avoids the need to zero out the output vector's memory before performing the insertions. We can also std::move the output std::vector into the destination so that we don't need to make a completely new copy of the vector, getting rid of an unnecessary allocation. Additionally, we can use iterators to determine the beginning and end ranges of the std::vector instances that comprise the output vector, as the end of one range just becomes the beginning for the next successive range, and since std::vector's iterator constructor copies data within the range [begin, end), this is more straightforward and gets rid of the need to have an offset variable that keeps getting incremented to determine where to do the next std::memcpy.
* partition_data_manager: Remove unused std::map instance within DecryptPackage2()Lioncash2018-10-131-2/+0
| | | | | Aside from emplacing elements into the map, the map itself is never actually queried for contained data.
* partition_data_manager: Take package2_keys by const referenceLioncash2018-10-131-1/+1
| | | | | These are only ever read from, so we don't need to make a copy of all the keys here.
* partition_data_manager: Move IV data to where it's needed in DecryptPackage2()Lioncash2018-10-131-3/+1
| | | | | | Given it's only used in one spot and has a fairly generic name, we can just specify it directly in the function call. This also the benefit of automatically moving it.
* partition_data_manager: Remove commented out codeLioncash2018-10-131-2/+0
| | | | | Commented out code shouldn't be left in without a reason indicating why in a comment.
* key_manager/partition_data_manager: Silence truncation compiler warningsLioncash2018-10-131-5/+7
|
* partition_data_manager: Dehardcode array boundsLioncash2018-10-131-5/+5
| | | | | | Instead, we can make it part of the type and make named variables for them, so they only require one definition (and if they ever change for whatever reason, they only need to be changed in one spot).
* partition_data_manager: Take VirtualFile by const reference in constructorLioncash2018-10-131-1/+1
| | | | | | Given the VirtualFile instance isn't stored into the class as a data member, or written to, this can just be turned into a const reference, as the constructor doesn't need to make a copy of it.
* partition_data_manager: Amend constructor initializer list orderLioncash2018-10-131-2/+3
| | | | | Orders the members in the exact order they would be initialized. This also prevents compiler warnings about this sort of thing.
* partition_data_manager: Remove unused includesLioncash2018-10-131-2/+1
| | | | | Gets unused includes out of the headers and moves them into the cpp file if they're used there instead.
* partition_data_manager: Rename system files for hekateZach Hilman2018-10-071-37/+52
| | | | x
* crypto: Add PartitionDataManagerZach Hilman2018-10-071-0/+586
Keeps track of system files for key derivation