github.com/remobjects/goldbaselibrary@v0.0.0-20230924164425-d458680a936b/Source/Gold/crypto/aes/cipher_generic.go (about) 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. 4 5 // +build !amd64,!s390x,!ppc64le 6 //##,!arm64 7 8 package aes 9 10 import ( 11 "crypto/cipher" 12 ) 13 14 // newCipher calls the newCipherGeneric function 15 // directly. Platforms with hardware accelerated 16 // implementations of AES should implement their 17 // own version of newCipher (which may then call 18 // newCipherGeneric if needed). 19 func newCipher(key []byte) (cipher.Block, error) { 20 return newCipherGeneric(key) 21 } 22 23 // expandKey is used by BenchmarkExpand and should 24 // call an assembly implementation if one is available. 25 func expandKey(key []byte, enc, dec []uint32) { 26 expandKeyGo(key, enc, dec) 27 }