def hex_to_b64(hex_str):
    """Convert Hex string to Base64 string."""
    arr = bytearray.fromhex(hex_str)
    decoded = ''.join([chr(c) for c in arr])
    b64_str = decoded.encode('base64').strip()
    return b64_str