ruby convert hex to base 64