Source file src/crypto/sha1/sha1block_arm64.go

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

View as plain text