Source file src/crypto/internal/fips140only/hash_fips140v1.28.go
1 // Copyright 2026 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 !(fips140v1.0 || fips140v1.26) 6 7 package fips140only 8 9 import ( 10 "crypto/internal/fips140" 11 "crypto/internal/fips140hash" 12 "hash" 13 ) 14 15 // ApprovedHash reports whether h, after [fips140hash.Unwrap], is an approved 16 // hash implementation from the FIPS 140-3 module. 17 func ApprovedHash(h hash.Hash) bool { 18 return fips140.ApprovedHash(fips140hash.Unwrap(h)) 19 } 20