summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Src/NANDContentLoader.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@Gmail.com>2013-10-27 18:27:07 +0000
committerRyan Houdek <Sonicadvance1@Gmail.com>2013-10-27 18:27:07 +0000
commit8e73e8ae5fad7f1f893832fcaf14b04e5e052795 (patch)
tree5b0fab3b66d4ac3c0641a6e1b604319c1b9821c7 /Source/Core/DiscIO/Src/NANDContentLoader.cpp
parent0791a9ef80889ffb70c67fbd6491635b0014747b (diff)
Wipe all traces of OpenSSL's AES implementation. Use polarssl instead.
Diffstat (limited to 'Source/Core/DiscIO/Src/NANDContentLoader.cpp')
-rw-r--r--Source/Core/DiscIO/Src/NANDContentLoader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
index 974f8a9945..4e722d1397 100644
--- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp
+++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
@@ -6,7 +6,7 @@
#include <algorithm>
#include <cctype>
-#include "Crypto/aes.h"
+#include <polarssl/aes.h>
#include "MathUtil.h"
#include "FileUtil.h"
#include "Log.h"
@@ -286,10 +286,10 @@ bool CNANDContentLoader::Initialize(const std::string& _rName)
}
void CNANDContentLoader::AESDecode(u8* _pKey, u8* _IV, u8* _pSrc, u32 _Size, u8* _pDest)
{
- AES_KEY AESKey;
+ aes_context AES_ctx;
- AES_set_decrypt_key(_pKey, 128, &AESKey);
- AES_cbc_encrypt(_pSrc, _pDest, _Size, &AESKey, _IV, AES_DECRYPT);
+ aes_setkey_dec(&AES_ctx, _pKey, 128);
+ aes_crypt_cbc(&AES_ctx, AES_DECRYPT, _Size, _IV, _pSrc, _pDest);
}
void CNANDContentLoader::GetKeyFromTicket(u8* pTicket, u8* pTicketKey)