1
0
Fork 0
forked from External/grumble

grumble: allow for other ciphers than OCB2-AES128.

This commit is contained in:
Mikkel Krautz 2012-12-08 23:50:32 +01:00
parent eacf839182
commit cd363d197e
3 changed files with 12 additions and 8 deletions

View file

@ -367,7 +367,7 @@ func (client *Client) udpRecvLoop() {
// through the client's control channel (TCP).
func (client *Client) SendUDP(buf []byte) error {
if client.udp {
crypted := make([]byte, len(buf)+4)
crypted := make([]byte, len(buf)+client.crypt.Overhead())
client.crypt.Encrypt(crypted, buf)
return client.server.SendUDP(crypted, client.udpaddr)
} else {