Skip to content

Commit

Permalink
Merge pull request #110 from jakcron/v1.8.0-release
Browse files Browse the repository at this point in the history
Update NSTool to v1.8.0
  • Loading branch information
jakcron committed Dec 31, 2023
2 parents d87c0fc + 7757a0f commit da13b0f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Compile Main Branch
name: Compile Main Branches

on:
push:
branches: [ main ]
branches: [ development-tip, stable ]
pull_request:
branches: [ main ]
branches: [ development-tip, stable ]
release:
types: [ created ]

Expand Down
20 changes: 8 additions & 12 deletions src/NcaProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,22 +488,18 @@ void nstool::NcaProcess::displayHeader()
if (mContentKey.kak_list.size() > 0 && mCliOutputMode.show_keydata)
{
fmt::print(" Key Area:\n");
fmt::print(" <--------------------------------------------------------------------------------------------------------->\n");
fmt::print(" | IDX | ENCRYPTED KEY | DECRYPTED KEY |\n");
fmt::print(" |-----|-------------------------------------------------|-------------------------------------------------|\n");
fmt::print(" <--------------------------------------------------------------------------->\n");
fmt::print(" | IDX | ENCRYPTED KEY | DECRYPTED KEY |\n");
fmt::print(" |-----|----------------------------------|----------------------------------|\n");
for (size_t i = 0; i < mContentKey.kak_list.size(); i++)
{
fmt::print(" | {:3d} | {:s} | ", mContentKey.kak_list[i].index, tc::cli::FormatUtil::formatBytesAsString(mContentKey.kak_list[i].enc.data(), mContentKey.kak_list[i].enc.size(), true, ""));
std::string enc_key = tc::cli::FormatUtil::formatBytesAsString(mContentKey.kak_list[i].enc.data(), mContentKey.kak_list[i].enc.size(), true, "");
std::string dec_key = mContentKey.kak_list[i].decrypted ? tc::cli::FormatUtil::formatBytesAsString(mContentKey.kak_list[i].dec.data(), mContentKey.kak_list[i].dec.size(), true, "") : "<unable to decrypt>";

if (mContentKey.kak_list[i].decrypted)
fmt::print("{:s}", tc::cli::FormatUtil::formatBytesAsString(mContentKey.kak_list[i].dec.data(), mContentKey.kak_list[i].dec.size(), true, ""));
else
fmt::print("<unable to decrypt> ");

fmt::print(" |\n");
fmt::print(" | {:3d} | {:32s} | {:32s} |\n", mContentKey.kak_list[i].index, enc_key, dec_key);

}
fmt::print(" <--------------------------------------------------------------------------------------------------------->\n");
fmt::print(" <--------------------------------------------------------------------------->\n");
}

if (mCliOutputMode.show_layout)
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
#define APP_NAME "NSTool"
#define BIN_NAME "nstool"
#define VER_MAJOR 1
#define VER_MINOR 7
#define VER_MINOR 8
#define VER_PATCH 0
#define AUTHORS "jakcron"

0 comments on commit da13b0f

Please sign in to comment.