Source file src/crypto/subtle/xor.go

     1  // Copyright 2022 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package subtle
     6  
     7  import "crypto/internal/fips/subtle"
     8  
     9  // XORBytes sets dst[i] = x[i] ^ y[i] for all i < n = min(len(x), len(y)),
    10  // returning n, the number of bytes written to dst.
    11  // If dst does not have length at least n,
    12  // XORBytes panics without writing anything to dst.
    13  func XORBytes(dst, x, y []byte) int {
    14  	return subtle.XORBytes(dst, x, y)
    15  }
    16  

View as plain text