Line 47:
Line 47:
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #dde;" | 0x01B
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #dde;" | 0x01B
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 4
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | 4
−
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | data size
+
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #edd;" | Data (APP) size
|- style="background-color: #ddd;"
|- style="background-color: #ddd;"
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x01C
| style="border: 1px solid #ccc; padding: 0.2em; background-color: #ded;" | 0x01C
Line 57:
Line 57:
The contents are stored in the WAD in the same order as in the TMD. Each block (header, contents) is aligned to 0x40 bytes.
The contents are stored in the WAD in the same order as in the TMD. Each block (header, contents) is aligned to 0x40 bytes.
−
The contents are encrypted using the title key (decrypt it from the [[Ticket|ticket]]) and the content index (in the TMD, the 2 first bytes of the IV are the index, the last 14 bytes are zeroes) as IV. The SHA1 of the decrypted content must match that stored in the TMD.
+
The contents (Data section) are encrypted using the title key (decrypt it from the [[Ticket|ticket]]) and the content index (in the TMD, the 2 first bytes of the IV are the index, the last 14 bytes are zeroes) as IV. The SHA1 of the decrypted content must match the hash that is stored in the TMD.
=== Footer ===
=== Footer ===
The "footer" is an optional, unencrypted timestamp / buildstamp.
The "footer" is an optional, unencrypted timestamp / buildstamp.