WhatsAppApi.WhatsApp.addAuthResponse C# (CSharp) Method

addAuthResponse() protected method

protected addAuthResponse ( ) : ProtocolTreeNode
return WhatsAppApi.Helper.ProtocolTreeNode
        protected ProtocolTreeNode addAuthResponse()
        {
            if (!this.challengeArray.ContainsKey("nonce"))
                this.challengeArray.Add("nonce", "");

            string resp = this.authenticate(this.challengeArray["nonce"]);

            var node = new ProtocolTreeNode("response",
                new KeyValue[] { new KeyValue("xmlns", "urn:ietf:params:xml:ns:xmpp-sasl") },
                Func.EncodeTo64(resp, this.sysEncoding));
            return node;
        }