mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
common/bitutil: add comment from crypto/subtle
This commit is contained in:
parent
b838c4c9f7
commit
da98e12697
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue