Debian Codegraph @

hash/sha3/xor_generic.go

raw symbols SCIP
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 package sha3scip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/
6
7 import "encoding/binaryscip-go gomod github.com/golang/go/src go1.12 `encoding/binary`/"
8
9 // xorInGeneric xors the bytes in buf into the state; it
10 // makes no non-portable assumptions about memory layout
11 // or alignment.
12 func xorInGenericscip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/xorInGeneric().(d *statescip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#, buf []byte) {
13 n := len(buf) / 8
14
15 for i := 0; i < n; i++ {
16 a := binaryscip-go gomod github.com/golang/go/src go1.12 `encoding/binary`/.LittleEndianscip-go gomod github.com/golang/go/src go1.12 `encoding/binary`/LittleEndian..Uint64scip-go gomod github.com/golang/go/src go1.12 `encoding/binary`/littleEndian#Uint64().(buf)
17 d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[i] ^= a
18 buf = buf[8:]
19 }
20 }
21
22 // copyOutGeneric copies ulint64s to a byte buffer.
23 func copyOutGenericscip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/copyOutGeneric().(d *statescip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#, b []byte) {
24 for i := 0; len(b) >= 8; i++ {
25 binaryscip-go gomod github.com/golang/go/src go1.12 `encoding/binary`/.LittleEndianscip-go gomod github.com/golang/go/src go1.12 `encoding/binary`/LittleEndian..PutUint64scip-go gomod github.com/golang/go/src go1.12 `encoding/binary`/littleEndian#PutUint64().(b, d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[i])
26 b = b[8:]
27 }
28 }