You are reading a single comment by @sameh.hady and its replies. Click here to read the full conversation.
  • in websockets you need to convert string to sha1 then to hex then base64 this hex
    I was doing something like:

    function hexEncode(str) {
        var x = [];
        for (var i = 0; i < str.length; i += 2) {
            x.push(String.fromCharCode("0x" + str.substr(i, 2)));
        }
        return btoa(x.join(""));
    }
    
About

Avatar for sameh.hady @sameh.hady started