xmpp/sasl.go
changeset 145 21a390dd3506
parent 143 62166e57800e
child 147 d7679d991b17
equal deleted inserted replaced
144:9d7fdb1d2fc1 145:21a390dd3506
     1 // Deal with SASL authentication.
     1 // Deal with SASL authentication.
     2 
     2 
     3 package xmpp
     3 package xmpp
     4 
     4 
     5 import (
     5 import (
     6 	"strings"
     6 	"crypto/md5"
       
     7 	"crypto/rand"
       
     8 	"encoding/base64"
     7 	"encoding/xml"
     9 	"encoding/xml"
     8 	"encoding/base64"
       
     9 	"fmt"
    10 	"fmt"
    10 	"math/big"
    11 	"math/big"
    11 	"crypto/rand"
       
    12 	"regexp"
    12 	"regexp"
    13 	"crypto/md5"
    13 	"strings"
    14 )
    14 )
    15 
    15 
    16 // BUG(cjyar): Doesn't implement TLS/SASL EXTERNAL.
    16 // BUG(cjyar): Doesn't implement TLS/SASL EXTERNAL.
    17 func (cl *Client) chooseSasl(fe *Features) {
    17 func (cl *Client) chooseSasl(fe *Features) {
    18 	var digestMd5 bool
    18 	var digestMd5 bool