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.
7 import "encoding/binary"
9 // xorInGeneric xors the bytes in buf into the state; it
10 // makes no non-portable assumptions about memory layout
12 func xorInGeneric(d *state, buf []byte) {
15 for i := 0; i < n; i++ {
16 a := binary.LittleEndian.Uint64(buf)
22 // copyOutGeneric copies ulint64s to a byte buffer.
23 func copyOutGeneric(d *state, b []byte) {
24 for i := 0; len(b) >= 8; i++ {
25 binary.LittleEndian.PutUint64(b, d.a[i])