forked from External/grumble
Merge pull request #11 from mkrautz/fix-cryptstate-typos
Fix a few typos in pkg/cryptstate.
This commit is contained in:
commit
578721ab74
1 changed files with 2 additions and 2 deletions
|
|
@ -194,7 +194,7 @@ func (cs *CryptState) Decrypt(dst, src []byte) error {
|
||||||
return errors.New("cryptstate: no matching ivbyte")
|
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
|
cs.DecryptIV = saveiv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -205,7 +205,7 @@ func (cs *CryptState) Decrypt(dst, src []byte) error {
|
||||||
return errors.New("cryptstate: tag mismatch")
|
return errors.New("cryptstate: tag mismatch")
|
||||||
}
|
}
|
||||||
|
|
||||||
cs.decryptHistory[cs.DecryptIV[0]] = cs.DecryptIV[0]
|
cs.decryptHistory[cs.DecryptIV[0]] = cs.DecryptIV[1]
|
||||||
|
|
||||||
if restore {
|
if restore {
|
||||||
cs.DecryptIV = saveiv
|
cs.DecryptIV = saveiv
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue