diff options
author | Ian Lance Taylor <iant@google.com> | 2016-02-03 21:58:02 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-02-03 21:58:02 +0000 |
commit | f98dd1a338867a408f7c72d73fbad7fe7fc93e3a (patch) | |
tree | 2f8da9862a9c1fe0df138917f997b03439c02773 /libgo/go/crypto/aes/cipher.go | |
parent | b081ed4efc144da0c45a6484aebfd10e0eb9fda3 (diff) | |
download | gcc-f98dd1a338867a408f7c72d73fbad7fe7fc93e3a.zip gcc-f98dd1a338867a408f7c72d73fbad7fe7fc93e3a.tar.gz gcc-f98dd1a338867a408f7c72d73fbad7fe7fc93e3a.tar.bz2 |
libgo: Update to go1.6rc1.
Reviewed-on: https://go-review.googlesource.com/19200
From-SVN: r233110
Diffstat (limited to 'libgo/go/crypto/aes/cipher.go')
-rw-r--r-- | libgo/go/crypto/aes/cipher.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libgo/go/crypto/aes/cipher.go b/libgo/go/crypto/aes/cipher.go index 2c6bb0a..04d2be1 100644 --- a/libgo/go/crypto/aes/cipher.go +++ b/libgo/go/crypto/aes/cipher.go @@ -38,9 +38,14 @@ func NewCipher(key []byte) (cipher.Block, error) { } n := k + 28 - c := &aesCipher{make([]uint32, n), make([]uint32, n)} + c := aesCipher{make([]uint32, n), make([]uint32, n)} expandKey(key, c.enc, c.dec) - return c, nil + + if hasGCMAsm() { + return &aesCipherGCM{c}, nil + } + + return &c, nil } func (c *aesCipher) BlockSize() int { return BlockSize } |