libgo: update to go1.9
[official-gcc.git] / libgo / go / crypto / aes / cipher_generic.go
blob98169bf5fd757a723f4d6a2bd0f7f4bd4c511f6f
1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // -build !amd64,!s390x,!ppc64le
7 package aes
9 import (
10 "crypto/cipher"
13 // newCipher calls the newCipherGeneric function
14 // directly. Platforms with hardware accelerated
15 // implementations of AES should implement their
16 // own version of newCipher (which may then call
17 // newCipherGeneric if needed).
18 func newCipher(key []byte) (cipher.Block, error) {
19 return newCipherGeneric(key)
22 // expandKey is used by BenchmarkExpand and should
23 // call an assembly implementation if one is available.
24 func expandKey(key []byte, enc, dec []uint32) {
25 expandKeyGo(key, enc, dec)