github.com/mdaxf/iac@v0.0.0-20240519030858-58a061660378/vendor_skip/golang.org/x/crypto/sha3/xor.go (about)

     1  // Copyright 2015 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  //go:build (!amd64 && !386 && !ppc64le) || purego
     6  
     7  package sha3
     8  
     9  // A storageBuf is an aligned array of maxRate bytes.
    10  type storageBuf [maxRate]byte
    11  
    12  func (b *storageBuf) asBytes() *[maxRate]byte {
    13  	return (*[maxRate]byte)(b)
    14  }
    15  
    16  var (
    17  	xorIn            = xorInGeneric
    18  	copyOut          = copyOutGeneric
    19  	xorInUnaligned   = xorInGeneric
    20  	copyOutUnaligned = copyOutGeneric
    21  )
    22  
    23  const xorImplementationUnaligned = "generic"