github.com/epfl-dcsl/gotee@v0.0.0-20200909122901-014b35f5e5e9/src/crypto/internal/cipherhw/cipherhw_amd64.go (about) 1 // Copyright 2016 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,!gccgo,!appengine 6 7 package cipherhw 8 9 import ( 10 "runtime" 11 ) 12 13 // defined in asm_amd64.s 14 func hasAESNI() bool 15 16 // AESGCMSupport returns true if the Go standard library supports AES-GCM in 17 // hardware. 18 func AESGCMSupport() bool { 19 if runtime.IsEnclave() { 20 return true 21 } 22 return hasAESNI() 23 }