github.com/zebozhuang/go@v0.0.0-20200207033046-f8a98f6f5c5d/src/crypto/internal/cipherhw/cipherhw_s390x.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 s390x,!gccgo,!appengine
     6  
     7  package cipherhw
     8  
     9  // hasHWSupport reports whether the AES-128, AES-192 and AES-256 cipher message
    10  // (KM) function codes are supported. Note that this function is expensive.
    11  // defined in asm_s390x.s
    12  func hasHWSupport() bool
    13  
    14  var hwSupport = hasHWSupport()
    15  
    16  func AESGCMSupport() bool {
    17  	return hwSupport
    18  }