diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-01-17 12:40:45 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-01-17 12:40:45 +0100 |
commit | 3e45412327a2654a77944249962b3652e6142299 (patch) | |
tree | bc3bf69452afa055423cbe0c5cfa8ca357df6ccf /src/pkg/crypto/block/eax.go | |
parent | c533680039762cacbc37db8dc7eed074c3e497be (diff) | |
download | golang-3e45412327a2654a77944249962b3652e6142299.tar.gz |
Imported Upstream version 2011.01.12upstream/2011.01.12
Diffstat (limited to 'src/pkg/crypto/block/eax.go')
-rw-r--r-- | src/pkg/crypto/block/eax.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/crypto/block/eax.go b/src/pkg/crypto/block/eax.go index cc3662787..3f3b96431 100644 --- a/src/pkg/crypto/block/eax.go +++ b/src/pkg/crypto/block/eax.go @@ -45,8 +45,8 @@ func setupEAX(c Cipher, iv, hdr []byte, tagBytes int) (ctrIV, tag []byte, cmac h cmac.Write(buf) // 0 cmac.Write(iv) sum := cmac.Sum() - ctrIV = copy(sum) - tag = copy(sum[0:tagBytes]) + ctrIV = dup(sum) + tag = dup(sum[0:tagBytes]) cmac.Reset() buf[n-1] = 1 @@ -237,8 +237,8 @@ func (x *eaxDecrypter) checkTag() os.Error { finishEAX(x.tag, x.cr.cmac) if !same(x.tag, x.cr.tag) { e := new(EAXTagError) - e.Computed = copy(x.tag) - e.Read = copy(x.cr.tag) + e.Computed = dup(x.tag) + e.Read = dup(x.cr.tag) return e } return nil |