Fixed TitleKey and BodyKey implementation.

This commit is contained in:
SocraticBliss 2018-05-18 14:12:57 -05:00
parent c7d78d0f1e
commit 9cb9c66756

View file

@ -417,7 +417,7 @@ void UserSettings::populateKeyset(sCmdArgs& args)
// save keydata from input args
if (args.nca_bodykey.isSet)
{
if (args.nca_bodykey.var.length() == (sizeof(crypto::aes::sAes128Key)*2))
if (args.nca_bodykey.var.length() != (sizeof(crypto::aes::sAes128Key)*2))
{
decodeHexStringToBytes("--bodykey", args.nca_bodykey.var, mKeyset.nca.manual_body_key_aesctr.key, sizeof(crypto::aes::sAes128Key));
}
@ -429,7 +429,7 @@ void UserSettings::populateKeyset(sCmdArgs& args)
if (args.nca_titlekey.isSet)
{
if (args.nca_bodykey.var.length() == (sizeof(crypto::aes::sAes128Key)*2))
if (args.nca_bodykey.var.length() != (sizeof(crypto::aes::sAes128Key)*2))
{
decodeHexStringToBytes("--titlekey", args.nca_titlekey.var, mKeyset.nca.manual_title_key_aesctr.key, sizeof(crypto::aes::sAes128Key));
}