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