github.com/devops-filetransfer/sshego@v7.0.4+incompatible/_vendor/golang.org/x/crypto/blake2b/blake2b_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 !go1.7,amd64,!gccgo,!appengine
     6  
     7  package blake2b
     8  
     9  func init() {
    10  	useSSE4 = supportsSSE4()
    11  }
    12  
    13  //go:noescape
    14  func supportsSSE4() bool
    15  
    16  //go:noescape
    17  func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte)
    18  
    19  func hashBlocks(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
    20  	if useSSE4 {
    21  		hashBlocksSSE4(h, c, flag, blocks)
    22  	} else {
    23  		hashBlocksGeneric(h, c, flag, blocks)
    24  	}
    25  }