github.com/insolar/x-crypto@v0.0.0-20191031140942-75fab8a325f6/sha256/sha256block_arm64.go (about) 1 // Copyright 2017 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 package sha256 6 7 import "golang.org/x/sys/cpu" 8 9 var k = _K 10 11 var hasSHA2 = cpu.ARM64.HasSHA2 12 13 //go:noescape 14 func sha256block(h []uint32, p []byte, k []uint32) 15 16 func block(dig *digest, p []byte) { 17 if !hasSHA2 { 18 blockGeneric(dig, p) 19 } else { 20 h := dig.h[:] 21 sha256block(h, p, k) 22 } 23 }