diff --git a/Source/Core/Core/ec_wii.cpp b/Source/Core/Core/ec_wii.cpp index b756f666a2..a0fbd33d16 100644 --- a/Source/Core/Core/ec_wii.cpp +++ b/Source/Core/Core/ec_wii.cpp @@ -7,15 +7,17 @@ // Licensed under the terms of the GNU GPL, version 2 // http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt +#include "Core/ec_wii.h" + #include #include #include +#include "Common/CommonFuncs.h" #include "Common/Crypto/ec.h" #include "Common/FileUtil.h" #include "Common/Logging/Log.h" -#include "Core/ec_wii.h" static u32 default_NG_id = 0x0403AC68; static u32 default_NG_key_id = 0x6AAB8C59; @@ -158,6 +160,26 @@ EcWii::~EcWii() { } +u32 EcWii::getNgId() +{ + return Common::swap32(BootMiiKeysBin.ng_id); +} + +u32 EcWii::getNgKeyId() +{ + return Common::swap32(BootMiiKeysBin.ng_key_id); +} + +const u8* EcWii::getNgPriv() +{ + return BootMiiKeysBin.ng_priv; +} + +const u8* EcWii::getNgSig() +{ + return BootMiiKeysBin.ng_sig; +} + void EcWii::InitDefaults() { memset(&BootMiiKeysBin, 0, sizeof(BootMiiKeysBin)); diff --git a/Source/Core/Core/ec_wii.h b/Source/Core/Core/ec_wii.h index 9142c666fb..d69bd9d911 100644 --- a/Source/Core/Core/ec_wii.h +++ b/Source/Core/Core/ec_wii.h @@ -24,7 +24,6 @@ #pragma once -#include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" void get_ng_cert(u8* ng_cert_out, u32 NG_id, u32 NG_key_id, const u8* NG_priv, const u8* NG_sig); @@ -40,10 +39,11 @@ public: EcWii(); ~EcWii(); static EcWii& GetInstance(); - u32 getNgId() { return Common::swap32(BootMiiKeysBin.ng_id); } - u32 getNgKeyId() { return Common::swap32(BootMiiKeysBin.ng_key_id); } - const u8* getNgPriv() { return BootMiiKeysBin.ng_priv; } - const u8* getNgSig() { return BootMiiKeysBin.ng_sig; } + u32 getNgId(); + u32 getNgKeyId(); + const u8* getNgPriv(); + const u8* getNgSig(); + private: void InitDefaults();