https://www.3dbrew.org/w/index.php?title=FRDU:IsValidFriendCode&feed=atom&action=historyFRDU:IsValidFriendCode - Revision history2024-03-29T06:20:42ZRevision history for this page on the wikiMediaWiki 1.35.8https://www.3dbrew.org/w/index.php?title=FRDU:IsValidFriendCode&diff=17840&oldid=prevIReir: Created page with "=Request= {| class="wikitable" border="1" |- ! Index Word ! Description |- | 0 | Header code [0x00260080] |- | 1-2 | (u64) friend code to validate |} The friend code can be..."2016-07-28T14:56:58Z<p>Created page with "=Request= {| class="wikitable" border="1" |- ! Index Word ! Description |- | 0 | Header code [0x00260080] |- | 1-2 | (u64) friend code to validate |} The friend code can be..."</p>
<p><b>New page</b></p><div>=Request=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Index Word<br />
! Description<br />
|-<br />
| 0<br />
| Header code [0x00260080]<br />
|-<br />
| 1-2<br />
| (u64) friend code to validate<br />
|}<br />
<br />
The friend code can be derived from the textual form of "1234-5678-9012" by stripping the slashes and then converting the string to an integer.<br />
<br />
This function just calls [[FRDU:PrincipalIdToFriendCode]] with the lower half of the friend code and checks if the checksum byte returned matches the input.<br />
<br />
=Response=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Index Word<br />
! Description<br />
|-<br />
| 0<br />
| Header code<br />
|-<br />
| 1<br />
| Result code<br />
|-<br />
| 2<br />
| 1 if the provided friend code is valid, 0 otherwise<br />
|}</div>IReir