Implement function HexString2Int