summaryrefslogtreecommitdiff
path: root/src/pkg/crypto/block/eax.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/crypto/block/eax.go')
-rw-r--r--src/pkg/crypto/block/eax.go8
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