I am trying to authenticate for a websocket. In the example in the docs it says if my client nonce is:
nonce = 0xf08c98caf1fd82e8cea9825dbff04fd0
then I should encode it using base64 to get:
target = "8IyYyvH9gujOqYJdv/BP0A==".
I'm not sure what I'm doing wrong but I get the following:
client_nonce = 0xf08c98caf1fd82e8cea9825dbff04fd0
str_client_nonce = str(client_nonce)
encoded = b64encode(bytes(str_client_nonce, 'utf-8'))
print(encoded)
>> b'MzE5NzQ0NzM5NTUzODE1NjMyMTAxNjk0MjM1NzExODU0NjI4ODE2'