Better handling of public key formatting to hex