...

Source file src/pkg/crypto/cipher/xor_ppc64x.go

     1	// Copyright 2018 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	// +build ppc64 ppc64le
     6	
     7	package cipher
     8	
     9	// xorBytes xors the bytes in a and b. The destination should have enough
    10	// space, otherwise xorBytes will panic. Returns the number of bytes xor'd.
    11	func xorBytes(dst, a, b []byte) int {
    12		n := len(a)
    13		if len(b) < n {
    14			n = len(b)
    15		}
    16		if n == 0 {
    17			return 0
    18		}
    19		_ = dst[n-1]
    20		xorBytesVSX(&dst[0], &a[0], &b[0], n)
    21		return n
    22	}
    23	
    24	func xorWords(dst, a, b []byte) {
    25		xorBytes(dst, a, b)
    26	}
    27	
    28	//go:noescape
    29	func xorBytesVSX(dst, a, b *byte, n int)
    30	

View as plain text