summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/xts_archive.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-12 10:47:32 +0100
committerLioncash <mathew1800@gmail.com>2019-11-12 13:55:39 +0100
commit86c397dd6e55202af02edd1606e4dcbdf64d0c8a (patch)
tree15fb011e0b39236ec784f0a5a341d0d73a3e2ce0 /src/core/file_sys/xts_archive.cpp
parentresult: Add default error code for the ResultCode(-1) case (diff)
downloadyuzu-86c397dd6e55202af02edd1606e4dcbdf64d0c8a.tar
yuzu-86c397dd6e55202af02edd1606e4dcbdf64d0c8a.tar.gz
yuzu-86c397dd6e55202af02edd1606e4dcbdf64d0c8a.tar.bz2
yuzu-86c397dd6e55202af02edd1606e4dcbdf64d0c8a.tar.lz
yuzu-86c397dd6e55202af02edd1606e4dcbdf64d0c8a.tar.xz
yuzu-86c397dd6e55202af02edd1606e4dcbdf64d0c8a.tar.zst
yuzu-86c397dd6e55202af02edd1606e4dcbdf64d0c8a.zip
Diffstat (limited to '')
-rw-r--r--src/core/file_sys/xts_archive.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/file_sys/xts_archive.cpp b/src/core/file_sys/xts_archive.cpp
index 4bc5cb2ee..b2b39502d 100644
--- a/src/core/file_sys/xts_archive.cpp
+++ b/src/core/file_sys/xts_archive.cpp
@@ -7,12 +7,13 @@
#include <cstring>
#include <regex>
#include <string>
+
#include <mbedtls/md.h>
#include <mbedtls/sha256.h>
-#include "common/assert.h"
+
#include "common/file_util.h"
#include "common/hex_util.h"
-#include "common/logging/log.h"
+#include "common/string_util.h"
#include "core/crypto/aes_util.h"
#include "core/crypto/xts_encryption_layer.h"
#include "core/file_sys/partition_filesystem.h"
@@ -53,11 +54,8 @@ NAX::NAX(VirtualFile file_) : header(std::make_unique<NAXHeader>()), file(std::m
return;
}
- std::string two_dir = match[1];
- std::string nca_id = match[2];
- std::transform(two_dir.begin(), two_dir.end(), two_dir.begin(), ::toupper);
- std::transform(nca_id.begin(), nca_id.end(), nca_id.begin(), ::tolower);
-
+ const std::string two_dir = Common::ToUpper(match[1]);
+ const std::string nca_id = Common::ToLower(match[2]);
status = Parse(fmt::format("/registered/{}/{}.nca", two_dir, nca_id));
}