(challengeKey string)
| 17 | var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11") |
| 18 | |
| 19 | func computeAcceptKey(challengeKey string) string { |
| 20 | h := sha1.New() |
| 21 | h.Write([]byte(challengeKey)) |
| 22 | h.Write(keyGUID) |
| 23 | return base64.StdEncoding.EncodeToString(h.Sum(nil)) |
| 24 | } |
| 25 | |
| 26 | func generateChallengeKey() (string, error) { |
| 27 | p := make([]byte, 16) |