aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2022-08-05 13:34:29 -0400
committerGopher Robot <gobot@golang.org>2022-08-17 18:47:33 +0000
commit57d05512feebed4fbe1e7a19305c8722a4ac627f (patch)
treed76190998eba10aa0750666a99a5ebfa4eb8e35b /api
parent90466e1ddf0e4305bc56f6eac61a690704e6fab8 (diff)
downloadgo-57d05512feebed4fbe1e7a19305c8722a4ac627f.tar.xz
crypto/subtle: add XORBytes
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>
Diffstat (limited to 'api')
-rw-r--r--api/next/53021.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/api/next/53021.txt b/api/next/53021.txt
new file mode 100644
index 0000000000..3adb9b1198
--- /dev/null
+++ b/api/next/53021.txt
@@ -0,0 +1 @@
+pkg crypto/subtle, func XORBytes([]uint8, []uint8, []uint8) int #53021