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 //go:build !purego 6 7 package sha1 8 9 import "internal/cpu" 10 11 var k = []uint32{ 12 0x5A827999, 13 0x6ED9EBA1, 14 0x8F1BBCDC, 15 0xCA62C1D6, 16 } 17 18 //go:noescape 19 func sha1block(h []uint32, p []byte, k []uint32) 20 21 func block(dig *digest, p []byte) { 22 if !cpu.ARM64.HasSHA1 { 23 blockGeneric(dig, p) 24 } else { 25 h := dig.h[:] 26 sha1block(h, p, k) 27 } 28 } 29