You also may want to add
<< uppercase
to StrToHexStr if you want all uppercase hex.