Request #
Word | Description |
---|---|
0 | 0x00240040Cmd0x0024Param1Xlat0 |
1 | Principal ID |
Response #
Word | Description |
---|---|
0 | 0x002400C0Cmd0x0024Param3Xlat0 |
1 | Result code |
2-3 | u64, Friend code |
Description #
Converts the given Principal ID to a Friend Code. The following algorithm is used (note: everything is in little endian):
principal_id_buf = principal_id as LE bytesfriend_code = ((sha1(principal_id_buf)[0] >> 1) << 32) | principal_id