...

Source file src/crypto/sha1/boring.go

Documentation: crypto/sha1

     1  // Copyright 2009 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  // Extra indirection here so that when building go_bootstrap
     6  // cmd/internal/boring is not even imported, so that we don't
     7  // have to maintain changes to cmd/dist's deps graph.
     8  
     9  //go:build !cmd_go_bootstrap && cgo
    10  // +build !cmd_go_bootstrap,cgo
    11  
    12  package sha1
    13  
    14  import (
    15  	"crypto/internal/boring"
    16  	"hash"
    17  )
    18  
    19  const boringEnabled = boring.Enabled
    20  
    21  func boringNewSHA1() hash.Hash { return boring.NewSHA1() }
    22  
    23  func boringUnreachable() { boring.Unreachable() }
    24  
    25  func boringSHA1(p []byte) [20]byte { return boring.SHA1(p) }
    26  

View as plain text