Difference between revisions of "FSPXI:CalcSavegameMAC"
Jump to navigation
Jump to search
(Created page with "=Request= {| class="wikitable" border="1" |- ! Index Word ! Description |- | 0 | Header code [0x000C0104] |- | 1 | File handle lower word |- | 2 | File handle upper word |- | 3...") |
(Make CalcSavegameMAC more correct and descriptive) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 15: | Line 15: | ||
|- | |- | ||
| 3 | | 3 | ||
− | | MAC | + | | Output MAC buffer size |
|- | |- | ||
| 4 | | 4 | ||
− | | | + | | Input buffer size |
|- | |- | ||
| 5 | | 5 | ||
− | | (inputbuf_size<<8) <nowiki>|</nowiki> | + | | (inputbuf_size<<8) <nowiki>|</nowiki> 6 |
|- | |- | ||
| 6 | | 6 | ||
− | | | + | | Input buffer pointer |
|- | |- | ||
| 7 | | 7 | ||
− | | | (macbuf_size<<8) <nowiki>|</nowiki> | + | | | (macbuf_size<<8) <nowiki>|</nowiki> 0x14 |
|- | |- | ||
| 8 | | 8 | ||
− | | MAC | + | | [[Savegames#MAC_header|MAC]] output buffer pointer |
|} | |} | ||
Line 45: | Line 45: | ||
| Result code | | Result code | ||
|} | |} | ||
+ | |||
+ | =Usage= | ||
+ | Used to calculate CMACs as stored in in [[DISA_and_DIFF#AES_CMAC|DISA/DIFF files]]. The file handle that is passed in determines the type of CMAC to calculate. The input buffer data is used as the input data for the CMAC type chosen, and, in the case of stacked CMAC types ([[DISA_and_DIFF#CTR-SIGN|CTR-SIGN]] or [[DISA_and_DIFF#CTR-NOR0|CTR-NOR0]]), the stacking is applied properly on top of the inner CMAC types. |
Latest revision as of 22:55, 23 May 2020
Request[edit]
Index Word | Description |
---|---|
0 | Header code [0x000C0104] |
1 | File handle lower word |
2 | File handle upper word |
3 | Output MAC buffer size |
4 | Input buffer size |
5 | (inputbuf_size<<8) | 6 |
6 | Input buffer pointer |
7 | (macbuf_size<<8) | 0x14 |
8 | MAC output buffer pointer |
Response[edit]
Index Word | Description |
---|---|
0 | Header code |
1 | Result code |
Usage[edit]
Used to calculate CMACs as stored in in DISA/DIFF files. The file handle that is passed in determines the type of CMAC to calculate. The input buffer data is used as the input data for the CMAC type chosen, and, in the case of stacked CMAC types (CTR-SIGN or CTR-NOR0), the stacking is applied properly on top of the inner CMAC types.