mirror of https://github.com/golang/go.git
Export cipher.xorBytes as subtle.XORBytes, for proposal #53021, to provide fast XOR to cryptography libraries outside crypto/cipher. Along with the move, implement the alignment check TODO in xor_generic.go, so that systems with neither unaligned accesses nor custom assembly can still XOR a word at a time in word-based algorithms like GCM. This removes the need for the separate cipher.xorWords. Fixes #53021. Change-Id: I58f80a922f1cff671b5ebc6168eb046e702b5a4c Reviewed-on: https://go-review.googlesource.com/c/go/+/421435 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Filippo Valsorda <filippo@golang.org> |
||
|---|---|---|
| .. | ||
| constant_time.go | ||
| constant_time_test.go | ||
| xor.go | ||
| xor_amd64.go | ||
| xor_amd64.s | ||
| xor_arm64.go | ||
| xor_arm64.s | ||
| xor_generic.go | ||
| xor_ppc64x.go | ||
| xor_ppc64x.s | ||
| xor_test.go | ||