mirror of
https://github.com/pgsty/minio.git
synced 2026-08-09 15:53:28 +03:00
4af89543cf
With following changes - Add SSE and refactor encryption API (#942) <Andreas Auernhammer> - add copyObject test changing metadata and preserving etag (#944) <Harshavardhana> - Add SSE-C tests for multipart, copy, get range operations (#941) <Harshavardhana> - Removing conditional check for notificationInfoCh in api-notication (#940) <Matthew Magaldi> - Honor prefix parameter in ListBucketPolicies API (#929) <kannappanr> - test for empty objects uploaded with SSE-C headers (#927) <kannappanr> - Encryption headers should also be set during initMultipart (#930) <Harshavardhana> - Add support for Content-Language metadata header (#928) <kannappanr> - Fix check for duplicate notification configuration entries (#917) <kannappanr> - allow OS to cleanup sockets in TIME_WAIT (#925) <Harshavardhana> - Sign V2: Fix signature calculation in virtual host style (#921) <A. Elleuch> - bucket policy: Support json string in Principal field (#919) <A. Elleuch> - Fix copyobject failure for empty files (#918) <kannappanr> - Add new constructor NewWithOptions to SDK (#915) <poornas> - Support redirect headers to sign again with new Host header. (#829) <Harshavardhana> - Fail in PutObject if invalid user metadata is passed <Harshavadhana> - PutObjectOptions Header: Don't include invalid header <Isaac Hess> - increase max retry count to 10 (#913) <poornas> - Add new regions for Paris and China west. (#905) <Harshavardhana> - fix s3signer to use req.Host header (#899) <Bartłomiej Nogaś>
62 lines
1.3 KiB
Go
62 lines
1.3 KiB
Go
// Copyright 2017 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build amd64,!gccgo,!appengine
|
|
|
|
package argon2
|
|
|
|
func init() {
|
|
useSSE4 = supportsSSE4()
|
|
}
|
|
|
|
//go:noescape
|
|
func supportsSSE4() bool
|
|
|
|
//go:noescape
|
|
func mixBlocksSSE2(out, a, b, c *block)
|
|
|
|
//go:noescape
|
|
func xorBlocksSSE2(out, a, b, c *block)
|
|
|
|
//go:noescape
|
|
func blamkaSSE4(b *block)
|
|
|
|
func processBlockSSE(out, in1, in2 *block, xor bool) {
|
|
var t block
|
|
mixBlocksSSE2(&t, in1, in2, &t)
|
|
if useSSE4 {
|
|
blamkaSSE4(&t)
|
|
} else {
|
|
for i := 0; i < blockLength; i += 16 {
|
|
blamkaGeneric(
|
|
&t[i+0], &t[i+1], &t[i+2], &t[i+3],
|
|
&t[i+4], &t[i+5], &t[i+6], &t[i+7],
|
|
&t[i+8], &t[i+9], &t[i+10], &t[i+11],
|
|
&t[i+12], &t[i+13], &t[i+14], &t[i+15],
|
|
)
|
|
}
|
|
for i := 0; i < blockLength/8; i += 2 {
|
|
blamkaGeneric(
|
|
&t[i], &t[i+1], &t[16+i], &t[16+i+1],
|
|
&t[32+i], &t[32+i+1], &t[48+i], &t[48+i+1],
|
|
&t[64+i], &t[64+i+1], &t[80+i], &t[80+i+1],
|
|
&t[96+i], &t[96+i+1], &t[112+i], &t[112+i+1],
|
|
)
|
|
}
|
|
}
|
|
if xor {
|
|
xorBlocksSSE2(out, in1, in2, &t)
|
|
} else {
|
|
mixBlocksSSE2(out, in1, in2, &t)
|
|
}
|
|
}
|
|
|
|
func processBlock(out, in1, in2 *block) {
|
|
processBlockSSE(out, in1, in2, false)
|
|
}
|
|
|
|
func processBlockXOR(out, in1, in2 *block) {
|
|
processBlockSSE(out, in1, in2, true)
|
|
}
|