Use Util.hexEncode instead of a custom function