def encode_hex_to_base32(hex_string):
 bin_form = binascii.unhexlify(hex_string)
 return base64.b32encode(bin_form)

def encode_hex_to_base32 ( hex_string ) : bin_form = binascii . unhexlify ( hex_string ) return base64 . b32encode ( bin_form )
encodes hex to base32 bit as per rfc4648 .