mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
vendor: sha256 32bit updated. (#2459)
This commit is contained in:
parent
4dec50ba51
commit
0a3d43273f
2
Makefile
2
Makefile
@ -101,7 +101,7 @@ deadcode:
|
|||||||
@GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/deadcode
|
@GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/deadcode
|
||||||
|
|
||||||
spelling:
|
spelling:
|
||||||
@GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell -error *
|
@GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell -error *.go
|
||||||
@GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell -error pkg/**/*
|
@GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/misspell -error pkg/**/*
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
|
33
vendor/github.com/minio/sha256-simd/cpuid_arm.go
generated
vendored
Normal file
33
vendor/github.com/minio/sha256-simd/cpuid_arm.go
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
// Minio Cloud Storage, (C) 2016 Minio, Inc.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
|
||||||
|
package sha256
|
||||||
|
|
||||||
|
func cpuid(op uint32) (eax, ebx, ecx, edx uint32) {
|
||||||
|
return 0, 0, 0, 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func cpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) {
|
||||||
|
return 0, 0, 0, 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func xgetbv(index uint32) (eax, edx uint32) {
|
||||||
|
return 0, 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func haveArmSha() bool {
|
||||||
|
// TODO: Implement feature detection for ARM
|
||||||
|
return true
|
||||||
|
}
|
13
vendor/github.com/minio/sha256-simd/sha256.go
generated
vendored
13
vendor/github.com/minio/sha256-simd/sha256.go
generated
vendored
@ -19,6 +19,7 @@ package sha256
|
|||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"hash"
|
"hash"
|
||||||
|
"runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Size - The size of a SHA256 checksum in bytes.
|
// Size - The size of a SHA256 checksum in bytes.
|
||||||
@ -62,7 +63,12 @@ func (d *digest) Reset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func block(dig *digest, p []byte) {
|
func block(dig *digest, p []byte) {
|
||||||
switch true {
|
is386bit := runtime.GOARCH == "386"
|
||||||
|
isARM := runtime.GOARCH == "arm"
|
||||||
|
if is386bit || isARM {
|
||||||
|
blockGeneric(dig, p)
|
||||||
|
}
|
||||||
|
switch !is386bit && !isARM {
|
||||||
case avx2:
|
case avx2:
|
||||||
blockAvx2Go(dig, p)
|
blockAvx2Go(dig, p)
|
||||||
case avx:
|
case avx:
|
||||||
@ -82,10 +88,9 @@ func New() hash.Hash {
|
|||||||
d := new(digest)
|
d := new(digest)
|
||||||
d.Reset()
|
d.Reset()
|
||||||
return d
|
return d
|
||||||
} else {
|
|
||||||
// default back to the standard golang implementation
|
|
||||||
return sha256.New()
|
|
||||||
}
|
}
|
||||||
|
// default back to the standard golang implementation
|
||||||
|
return sha256.New()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sum256 - single caller sha256 helper
|
// Sum256 - single caller sha256 helper
|
||||||
|
9
vendor/github.com/minio/sha256-simd/sha256blockAvx2_amd64.go
generated
vendored
9
vendor/github.com/minio/sha256-simd/sha256blockAvx2_amd64.go
generated
vendored
@ -20,12 +20,3 @@ package sha256
|
|||||||
|
|
||||||
//go:noescape
|
//go:noescape
|
||||||
func blockAvx2(h []uint32, message []uint8)
|
func blockAvx2(h []uint32, message []uint8)
|
||||||
|
|
||||||
func blockAvx2Go(dig *digest, p []byte) {
|
|
||||||
|
|
||||||
h := []uint32{dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7]}
|
|
||||||
|
|
||||||
blockAvx2(h[:], p[:])
|
|
||||||
|
|
||||||
dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7] = h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7]
|
|
||||||
}
|
|
||||||
|
9
vendor/github.com/minio/sha256-simd/sha256blockAvx_amd64.go
generated
vendored
9
vendor/github.com/minio/sha256-simd/sha256blockAvx_amd64.go
generated
vendored
@ -20,12 +20,3 @@ package sha256
|
|||||||
|
|
||||||
//go:noescape
|
//go:noescape
|
||||||
func blockAvx(h []uint32, message []uint8, reserved0, reserved1, reserved2, reserved3 uint64)
|
func blockAvx(h []uint32, message []uint8, reserved0, reserved1, reserved2, reserved3 uint64)
|
||||||
|
|
||||||
func blockAvxGo(dig *digest, p []byte) {
|
|
||||||
|
|
||||||
h := []uint32{dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7]}
|
|
||||||
|
|
||||||
blockAvx(h[:], p[:], 0, 0, 0, 0)
|
|
||||||
|
|
||||||
dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7] = h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7]
|
|
||||||
}
|
|
||||||
|
9
vendor/github.com/minio/sha256-simd/sha256blockSsse_amd64.go
generated
vendored
9
vendor/github.com/minio/sha256-simd/sha256blockSsse_amd64.go
generated
vendored
@ -20,12 +20,3 @@ package sha256
|
|||||||
|
|
||||||
//go:noescape
|
//go:noescape
|
||||||
func blockSsse(h []uint32, message []uint8, reserved0, reserved1, reserved2, reserved3 uint64)
|
func blockSsse(h []uint32, message []uint8, reserved0, reserved1, reserved2, reserved3 uint64)
|
||||||
|
|
||||||
func blockSsseGo(dig *digest, p []byte) {
|
|
||||||
|
|
||||||
h := []uint32{dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7]}
|
|
||||||
|
|
||||||
blockSsse(h[:], p[:], 0, 0, 0, 0)
|
|
||||||
|
|
||||||
dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7] = h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7]
|
|
||||||
}
|
|
||||||
|
24
vendor/github.com/minio/sha256-simd/sha256block_386.go
generated
vendored
Normal file
24
vendor/github.com/minio/sha256-simd/sha256block_386.go
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
//+build !noasm
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Minio Cloud Storage, (C) 2016 Minio, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package sha256
|
||||||
|
|
||||||
|
func blockArmGo(dig *digest, p []byte) {}
|
||||||
|
func blockAvx2Go(dig *digest, p []byte) {}
|
||||||
|
func blockAvxGo(dig *digest, p []byte) {}
|
||||||
|
func blockSsseGo(dig *digest, p []byte) {}
|
27
vendor/github.com/minio/sha256-simd/sha256block_amd64.go
generated
vendored
27
vendor/github.com/minio/sha256-simd/sha256block_amd64.go
generated
vendored
@ -19,3 +19,30 @@
|
|||||||
package sha256
|
package sha256
|
||||||
|
|
||||||
func blockArmGo(dig *digest, p []byte) {}
|
func blockArmGo(dig *digest, p []byte) {}
|
||||||
|
|
||||||
|
func blockAvxGo(dig *digest, p []byte) {
|
||||||
|
|
||||||
|
h := []uint32{dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7]}
|
||||||
|
|
||||||
|
blockAvx(h[:], p[:], 0, 0, 0, 0)
|
||||||
|
|
||||||
|
dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7] = h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7]
|
||||||
|
}
|
||||||
|
|
||||||
|
func blockAvx2Go(dig *digest, p []byte) {
|
||||||
|
|
||||||
|
h := []uint32{dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7]}
|
||||||
|
|
||||||
|
blockAvx2(h[:], p[:])
|
||||||
|
|
||||||
|
dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7] = h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7]
|
||||||
|
}
|
||||||
|
|
||||||
|
func blockSsseGo(dig *digest, p []byte) {
|
||||||
|
|
||||||
|
h := []uint32{dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7]}
|
||||||
|
|
||||||
|
blockSsse(h[:], p[:], 0, 0, 0, 0)
|
||||||
|
|
||||||
|
dig.h[0], dig.h[1], dig.h[2], dig.h[3], dig.h[4], dig.h[5], dig.h[6], dig.h[7] = h[0], h[1], h[2], h[3], h[4], h[5], h[6], h[7]
|
||||||
|
}
|
||||||
|
24
vendor/github.com/minio/sha256-simd/sha256block_arm.go
generated
vendored
Normal file
24
vendor/github.com/minio/sha256-simd/sha256block_arm.go
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
//+build !noasm
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Minio Cloud Storage, (C) 2016 Minio, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package sha256
|
||||||
|
|
||||||
|
func blockAvx2Go(dig *digest, p []byte) {}
|
||||||
|
func blockAvxGo(dig *digest, p []byte) {}
|
||||||
|
func blockSsseGo(dig *digest, p []byte) {}
|
||||||
|
func blockArmGo(dig *digest, p []byte) {}
|
2
vendor/github.com/minio/sha256-simd/sha256block_arm64.go
generated
vendored
2
vendor/github.com/minio/sha256-simd/sha256block_arm64.go
generated
vendored
@ -19,7 +19,7 @@
|
|||||||
package sha256
|
package sha256
|
||||||
|
|
||||||
func blockAvx2Go(dig *digest, p []byte) {}
|
func blockAvx2Go(dig *digest, p []byte) {}
|
||||||
func blockAvxGo(dig *digest, p []byte) {}
|
func blockAvxGo(dig *digest, p []byte) {}
|
||||||
func blockSsseGo(dig *digest, p []byte) {}
|
func blockSsseGo(dig *digest, p []byte) {}
|
||||||
|
|
||||||
//go:noescape
|
//go:noescape
|
||||||
|
6
vendor/vendor.json
vendored
6
vendor/vendor.json
vendored
@ -119,10 +119,10 @@
|
|||||||
"revisionTime": "2016-07-24T00:05:56Z"
|
"revisionTime": "2016-07-24T00:05:56Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "pGgL9xre+/LmNfZV7rNE8uyAovQ=",
|
"checksumSHA1": "i8Hl0yGP1jqorMgfFMoJCItnI38=",
|
||||||
"path": "github.com/minio/sha256-simd",
|
"path": "github.com/minio/sha256-simd",
|
||||||
"revision": "8058cafa697e657caa0beb136bd3cbda50fc4496",
|
"revision": "6f50cd1d784b2bea46167b6929f16c0d12eefbfb",
|
||||||
"revisionTime": "2016-07-28T21:10:57Z"
|
"revisionTime": "2016-08-16T22:25:11Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/pkg/profile",
|
"path": "github.com/pkg/profile",
|
||||||
|
Loading…
Reference in New Issue
Block a user