Added a function that converts a string to hexadecimal