forked from External/grumble
grumble: allow for other ciphers than OCB2-AES128.
This commit is contained in:
parent
eacf839182
commit
cd363d197e
3 changed files with 12 additions and 8 deletions
|
|
@ -109,8 +109,8 @@ func (cs *CryptState) Decrypt(dst, src []byte) error {
|
|||
}
|
||||
|
||||
plain_len := len(src) - cs.Overhead()
|
||||
if len(dst) != plain_len {
|
||||
return errors.New("cryptstate: plain_len and src len mismatch")
|
||||
if len(dst) < plain_len {
|
||||
return errors.New("cryptstate: not enough space in dst for plain text")
|
||||
}
|
||||
|
||||
ivbyte := src[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue