You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xor.go 579B

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