update AEADs to allow in-place encryption and decryption

ref #217
This commit is contained in:
Lucas Clemente
2016-07-26 14:51:19 +02:00
parent eb9c23096d
commit d5255a4075
13 changed files with 99 additions and 78 deletions

View File

@@ -132,7 +132,7 @@ func (p *packetPacker) packPacket(stopWaitingFrame *frames.StopWaitingFrame, con
return nil, err
}
ciphertext := p.cryptoSetup.Seal(currentPacketNumber, raw.Bytes(), payload)
ciphertext := p.cryptoSetup.Seal(nil, payload, currentPacketNumber, raw.Bytes())
raw.Write(ciphertext)
if protocol.ByteCount(raw.Len()) > protocol.MaxPacketSize {