github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/crypto/internal/boring/sha.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 //go:build boringcrypto && linux && (amd64 || arm64) && !android && !msan 6 7 package boring 8 9 import ( 10 "github.com/shogo82148/std/hash" 11 ) 12 13 func SHA1(p []byte) (sum [20]byte) 14 15 func SHA224(p []byte) (sum [28]byte) 16 17 func SHA256(p []byte) (sum [32]byte) 18 19 func SHA384(p []byte) (sum [48]byte) 20 21 func SHA512(p []byte) (sum [64]byte) 22 23 // NewSHA1 returns a new SHA1 hash. 24 func NewSHA1() hash.Hash 25 26 // NewSHA224 returns a new SHA224 hash. 27 func NewSHA224() hash.Hash 28 29 // NewSHA256 returns a new SHA256 hash. 30 func NewSHA256() hash.Hash 31 32 // NewSHA384 returns a new SHA384 hash. 33 func NewSHA384() hash.Hash 34 35 // NewSHA512 returns a new SHA512 hash. 36 func NewSHA512() hash.Hash