"expvar"
"fmt"
"io"
- "io/ioutil"
"math"
"math/big"
"strconv"
return h.Sum(nil)
}
-func newEncrypt(initer bool, s []byte, skey []byte) (c *rc4.Cipher) {
+func newEncrypt(initer bool, s, skey []byte) (c *rc4.Cipher) {
c, err := rc4.NewCipher(hash([]byte(func() string {
if initer {
return "keyA"
if err != nil {
return
}
- _, err = io.CopyN(ioutil.Discard, r, int64(padLen))
+ _, err = io.CopyN(io.Discard, r, int64(padLen))
if err != nil {
return
}
}
cryptoProvidesCount.Add(strconv.FormatUint(uint64(provides), 16), 1)
chosen = h.chooseMethod(provides)
- _, err = io.CopyN(ioutil.Discard, r, int64(padLen))
+ _, err = io.CopyN(io.Discard, r, int64(padLen))
if err != nil {
return
}
}
func InitiateHandshake(
- rw io.ReadWriter, skey []byte, initialPayload []byte, cryptoProvides CryptoMethod,
+ rw io.ReadWriter, skey, initialPayload []byte, cryptoProvides CryptoMethod,
) (
ret io.ReadWriter, method CryptoMethod, err error,
) {