| 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 | // +build amd64 386 ppc64le |
| 6 | // +build !appengine |
| 7 | |
| 8 | package sha3scip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/ |
| 9 | |
| 10 | import "unsafescip-go gomod github.com/golang/go/src go1.12 unsafe/" |
| 11 | |
| 12 | func xorInUnalignedscip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/xorInUnaligned().(d *statescip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#, buf []byte) { |
| 13 | bw := (*[maxRatescip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/maxRate. / 8]uint64)(unsafescip-go gomod github.com/golang/go/src go1.12 unsafe/.Pointer(&buf[0])) |
| 14 | n := len(buf) |
| 15 | if n >= 72 { |
| 16 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[0] ^= bw[0] |
| 17 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[1] ^= bw[1] |
| 18 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[2] ^= bw[2] |
| 19 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[3] ^= bw[3] |
| 20 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[4] ^= bw[4] |
| 21 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[5] ^= bw[5] |
| 22 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[6] ^= bw[6] |
| 23 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[7] ^= bw[7] |
| 24 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[8] ^= bw[8] |
| 25 | } |
| 26 | if n >= 104 { |
| 27 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[9] ^= bw[9] |
| 28 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[10] ^= bw[10] |
| 29 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[11] ^= bw[11] |
| 30 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[12] ^= bw[12] |
| 31 | } |
| 32 | if n >= 136 { |
| 33 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[13] ^= bw[13] |
| 34 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[14] ^= bw[14] |
| 35 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[15] ^= bw[15] |
| 36 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[16] ^= bw[16] |
| 37 | } |
| 38 | if n >= 144 { |
| 39 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[17] ^= bw[17] |
| 40 | } |
| 41 | if n >= 168 { |
| 42 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[18] ^= bw[18] |
| 43 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[19] ^= bw[19] |
| 44 | d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[20] ^= bw[20] |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func copyOutUnalignedscip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/copyOutUnaligned().(d *statescip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#, buf []byte) { |
| 49 | ab := (*[maxRatescip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/maxRate.]uint8)(unsafescip-go gomod github.com/golang/go/src go1.12 unsafe/.Pointer(&d.ascip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/state#a.[0])) |
| 50 | copy(buf, ab[:]) |
| 51 | } |
| 52 | |
| 53 | var ( |
| 54 | xorInscip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/xorIn. = xorInUnalignedscip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/xorInUnaligned(). |
| 55 | copyOutscip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/copyOut. = copyOutUnalignedscip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/copyOutUnaligned(). |
| 56 | ) |
| 57 | |
| 58 | const xorImplementationUnalignedscip-go gomod github.com/henrydcase/nobs . `github.com/henrydcase/nobs/hash/sha3`/xorImplementationUnaligned. = "unaligned" |