Correctly generate IV for Title Key decrpytion for all Title ID formats

This commit is contained in:
Campbell 2024-07-28 03:15:51 -04:00
parent 7daba7ec86
commit d6e6352d0a
Signed by: NinjaCheetah
GPG Key ID: B547958AF96ED344

View File

@ -17,7 +17,7 @@ def _convert_tid_to_iv(title_id: str | bytes) -> bytes:
title_key_iv = binascii.unhexlify(title_id)
# This catches the format b'\x00\x00\x00\x01\x00\x00\x00\x02'
elif len(title_id) == 8:
pass
title_key_iv = title_id
# If it isn't one of those lengths, it cannot possibly be valid, so reject it.
else:
raise ValueError("Title ID is not valid!")