diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2012-12-09 02:50:32 +0400 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2012-12-09 02:50:32 +0400 |
commit | cd363d197ea2eed48c3f87fd3e1ea5883ff46205 (patch) | |
tree | 944eea1084271d6c419c1bea627e4f0a1d3a35eb /pkg | |
parent | eacf839182d1efcd45991eedf227d365458d9c03 (diff) |
grumble: allow for other ciphers than OCB2-AES128.
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/cryptstate/cryptstate.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/cryptstate/cryptstate.go b/pkg/cryptstate/cryptstate.go index 43493bf..2b474cc 100644 --- a/pkg/cryptstate/cryptstate.go +++ b/pkg/cryptstate/cryptstate.go @@ -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] |