Throw on IOException if the FST length is not aligned to 16 before decrypting.

This commit is contained in:
Maschell 2019-04-10 19:59:56 +02:00
parent b836705e92
commit de7909eb34

View File

@ -72,6 +72,9 @@ public class NUSTitleLoader {
if (fstContent.isEncrypted()) {
AESDecryption aesDecryption = new AESDecryption(ticket.getDecryptedKey(), new byte[0x10]);
if (fstBytes.length % 0x10 != 0) {
throw new IOException("FST length is not align to 16");
}
fstBytes = aesDecryption.decrypt(fstBytes);
}