Compare commits
2 Commits
main
...
no-encrypt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8eb78f020 | ||
|
|
601d88af74 |
|
|
@ -1802,10 +1802,10 @@ func (c *Client) receiveData(i int) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
data, err = crypt.Decrypt(data, c.Key)
|
// data, err = crypt.Decrypt(data, c.Key)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
panic(err)
|
// panic(err)
|
||||||
}
|
// }
|
||||||
if !c.Options.NoCompress {
|
if !c.Options.NoCompress {
|
||||||
data = compress.Decompress(data)
|
data = compress.Decompress(data)
|
||||||
}
|
}
|
||||||
|
|
@ -1904,10 +1904,7 @@ func (c *Client) sendData(i int) {
|
||||||
var err error
|
var err error
|
||||||
var dataToSend []byte
|
var dataToSend []byte
|
||||||
if c.Options.NoCompress {
|
if c.Options.NoCompress {
|
||||||
dataToSend, err = crypt.Encrypt(
|
dataToSend = append(posByte, data[:n]...)
|
||||||
append(posByte, data[:n]...),
|
|
||||||
c.Key,
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
dataToSend, err = crypt.Encrypt(
|
dataToSend, err = crypt.Encrypt(
|
||||||
compress.Compress(
|
compress.Compress(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue