github.com/emmansun/gmsm@v0.29.1/sm4/cipher_generic.go (about)

     1  //go:build purego || !(amd64 || arm64 || ppc64 || ppc64le)
     2  
     3  package sm4
     4  
     5  import "crypto/cipher"
     6  
     7  // newCipher calls the newCipherGeneric function
     8  // directly. Platforms with hardware accelerated
     9  // implementations of SM4 should implement their
    10  // own version of newCipher (which may then call
    11  // newCipherGeneric if needed).
    12  func newCipher(key []byte) (cipher.Block, error) {
    13  	return newCipherGeneric(key)
    14  }