Validate and secure WebSocket data

I have a WebSocket server written in javascript and send data to it from my CSharp application. Now I ask myself how can I make sure that these are correct and not faked. I thought I could do something with hash values but I don’t know how to do that. Does anyone have an idea or code example