Add support for custom decrypted TitleKey

This commit is contained in:
xprism1
2021-01-25 17:26:22 +08:00
parent 319c4c6a24
commit 6ebef3c42a
4 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ void SetupTicketHeader(tik_hdr *hdr, cia_settings *ciaset)
SetLimits(hdr,ciaset);
// Crypt TitleKey
if(ciaset->content.encryptCia)
if(ciaset->content.encryptCia || ciaset->common.titleKey)
CryptTitleKey(ciaset->common.titleKey, hdr->encryptedTitleKey, hdr->titleId, ciaset->keys, ENC);
else
rndset(hdr->encryptedTitleKey,AES_128_KEY_SIZE);