diff options
| author | Frederic L <frederic.laing.development@gmail.com> | 2018-10-30 05:03:25 +0100 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2018-10-30 00:03:25 -0400 |
| commit | 7a5eda59146306dedaf3e6f07f97a8c6898543dd (patch) | |
| tree | 78e07b43fb0113f95e1c8e9426d3b394b9524d4e /src/core/crypto/key_manager.h | |
| parent | adf26ae668eada321b69e52be40300110e47aa56 (diff) | |
global: Use std::optional instead of boost::optional (#1578)
* get rid of boost::optional
* Remove optional references
* Use std::reference_wrapper for optional references
* Fix clang format
* Fix clang format part 2
* Adressed feedback
* Fix clang format and MacOS build
Diffstat (limited to 'src/core/crypto/key_manager.h')
| -rw-r--r-- | src/core/crypto/key_manager.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/crypto/key_manager.h b/src/core/crypto/key_manager.h index cccb3c0ae..22f268c65 100644 --- a/src/core/crypto/key_manager.h +++ b/src/core/crypto/key_manager.h @@ -6,9 +6,10 @@ #include <array> #include <map> +#include <optional> #include <string> + #include <boost/container/flat_map.hpp> -#include <boost/optional.hpp> #include <fmt/format.h> #include "common/common_types.h" #include "core/crypto/partition_data_manager.h" @@ -191,14 +192,14 @@ Key128 DeriveMasterKey(const std::array<u8, 0x90>& keyblob, const Key128& master std::array<u8, 0x90> DecryptKeyblob(const std::array<u8, 0xB0>& encrypted_keyblob, const Key128& key); -boost::optional<Key128> DeriveSDSeed(); +std::optional<Key128> DeriveSDSeed(); Loader::ResultStatus DeriveSDKeys(std::array<Key256, 2>& sd_keys, KeyManager& keys); std::vector<TicketRaw> GetTicketblob(const FileUtil::IOFile& ticket_save); // Returns a pair of {rights_id, titlekey}. Fails if the ticket has no certificate authority (offset // 0x140-0x144 is zero) -boost::optional<std::pair<Key128, Key128>> ParseTicket( - const TicketRaw& ticket, const RSAKeyPair<2048>& eticket_extended_key); +std::optional<std::pair<Key128, Key128>> ParseTicket(const TicketRaw& ticket, + const RSAKeyPair<2048>& eticket_extended_key); } // namespace Core::Crypto |
