storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/pkg/hash/sha256_nofips.go (about) 1 // MinIO Cloud Storage, (C) 2021 MinIO, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 //go:build !fips 16 // +build !fips 17 18 package hash 19 20 import ( 21 "hash" 22 23 sha256 "github.com/minio/sha256-simd" 24 ) 25 26 // newSHA256 returns a new hash.Hash computing the SHA256 checksum. 27 // The SHA256 implementation is not FIPS 140-2 compliant. 28 func newSHA256() hash.Hash { return sha256.New() }