Well, I don't know what the correct code is, so you should ask Valve. It's their software so they must know the answer.
GetStaticAccountKey()
also returns a uint64 and its description says "Converts the static parts of a steam ID to a 64-bit representation." So it looks like there are two methods that could be a 64-bit Steam ID. I don't know which is the right one and I don't want to just change the existing implementation without knowing why, especially as that may be a breaking change. So please ask Valve to clear up the confusion!