Migration services: Difference between revisions

No edit summary
Line 678: Line 678:
The global constant used with hashing below is the same regardless of the AdvertiseData.
The global constant used with hashing below is the same regardless of the AdvertiseData.


Later the server also sets the AdvertiseData to {0x10-byte data}.
Later the server also sets the AdvertiseData to {0x10-byte Uuid previously used below}.
 
The Uuid used below is generated with <code>nn::util::GenerateUuid</code>.


== user ==
== user ==
Line 731: Line 733:
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x10 ||  
| 0x0 || 0x10 || Uuid
|-
|-
| 0x10 || 0x8 || AccountId
| 0x10 || 0x8 || AccountId
Line 747: Line 749:


The hash is calculated by using SHA256-update with each field separately, followed by global constant:
The hash is calculated by using SHA256-update with each field separately, followed by global constant:
* +0x0 size 0x10
* Uuid
* AccountId
* AccountId
* ApplicationId
* ApplicationId
Line 761: Line 763:
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x10 ||  
| 0x0 || 0x10 || Uuid
|-
|-
| 0x10 || 0x40 (0x8*0x8) || Array of u64s with the below count.
| 0x10 || 0x40 (0x8*0x8) || Array of u64s with the below count.
Line 775: Line 777:


The hash is calculated by using SHA256-update with each field separately, followed by global constant:
The hash is calculated by using SHA256-update with each field separately, followed by global constant:
* +0x0 size 0x10-bytes
* Uuid
* +0x10 size 0x40-bytes
* +0x10 size 0x40-bytes
* +0x50 size 0x4-bytes
* +0x50 size 0x4-bytes