common/bitutil: add comment from crypto/subtle

This commit is contained in:
Felix Lange 2025-12-08 15:23:06 +01:00
parent b838c4c9f7
commit da98e12697

View file

@ -18,6 +18,12 @@ const supportsUnaligned = runtime.GOARCH == "386" || runtime.GOARCH == "amd64" |
// XORBytes xors the bytes in a and b. The destination is assumed to have enough
// space. Returns the number of bytes xor'd.
//
// If dst does not have length at least n,
// XORBytes panics without writing anything to dst.
//
// dst and x or y may overlap exactly or not at all,
// otherwise XORBytes may panic.
func XORBytes(dst, a, b []byte) int {
return subtle.XORBytes(dst, a, b)
}