cipher_generic.go 683 B

12345678910111213141516171819202122
  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. // +build !amd64
  5. package aes12
  6. // newCipher calls the newCipherGeneric function
  7. // directly. Platforms with hardware accelerated
  8. // implementations of AES should implement their
  9. // own version of newCipher (which may then call
  10. // newCipherGeneric if needed).
  11. func newCipher(key []byte) (Block, error) {
  12. return newCipherGeneric(key)
  13. }
  14. // expandKey is used by BenchmarkExpand and should
  15. // call an assembly implementation if one is available.
  16. func expandKey(key []byte, enc, dec []uint32) {
  17. expandKeyGo(key, enc, dec)
  18. }