in reply to Converting integer to bytes

If you are sure the user ID is an integer:

my $user_id_h = unpack("H*", pack("Q>",$user_id)); print(dump($user_id_h));
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'