Fix a few typos in pkg/cryptstate.

Thanks to @GEverding for mentioning this in mumble-voip/grumble#9
This commit is contained in:
Mikkel Krautz 2016-10-15 19:06:05 +02:00
parent defccdcdf9
commit cac5952847

View file

@ -194,7 +194,7 @@ func (cs *CryptState) Decrypt(dst, src []byte) error {
return errors.New("cryptstate: no matching ivbyte")
}
if cs.decryptHistory[cs.DecryptIV[0]] == cs.DecryptIV[0] {
if cs.decryptHistory[cs.DecryptIV[0]] == cs.DecryptIV[1] {
cs.DecryptIV = saveiv
}
}
@ -205,7 +205,7 @@ func (cs *CryptState) Decrypt(dst, src []byte) error {
return errors.New("cryptstate: tag mismatch")
}
cs.decryptHistory[cs.DecryptIV[0]] = cs.DecryptIV[0]
cs.decryptHistory[cs.DecryptIV[0]] = cs.DecryptIV[1]
if restore {
cs.DecryptIV = saveiv