Retire ref_type
Pack user id and ticket id into a binary string as unsigned long

The main intension is to have a predictable length and position of
the ids - obfuscation is a welcomed side effect.