Gofmt.
parent
0b361a2be7
commit
33dc508782
2
gen.go
2
gen.go
|
@ -48,7 +48,7 @@ func mul(a, b int) int { return a * b }
|
||||||
func mod(a, b int) int { return a % b }
|
func mod(a, b int) int { return a % b }
|
||||||
|
|
||||||
func afunc(x, y int) string {
|
func afunc(x, y int) string {
|
||||||
return fmt.Sprintf("a[%d]", y%5*5 + x%5)
|
return fmt.Sprintf("a[%d]", y%5*5+x%5)
|
||||||
}
|
}
|
||||||
|
|
||||||
func bfunc(x, y int) string {
|
func bfunc(x, y int) string {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package keccak
|
package keccak
|
||||||
|
|
||||||
// roundGeneric implements one round of the keccak-f[1600] permutation.
|
// roundGeneric implements one round of the keccak-f[1600] permutation.
|
||||||
|
|
10
sponge.go
10
sponge.go
|
@ -52,11 +52,11 @@ func (d *digest) flush() {
|
||||||
b := d.buf[:d.len]
|
b := d.buf[:d.len]
|
||||||
loop:
|
loop:
|
||||||
for i := range d.a {
|
for i := range d.a {
|
||||||
if len(b) == 0 {
|
if len(b) == 0 {
|
||||||
break loop
|
break loop
|
||||||
}
|
}
|
||||||
d.a[i] ^= le64dec(b)
|
d.a[i] ^= le64dec(b)
|
||||||
b = b[8:]
|
b = b[8:]
|
||||||
}
|
}
|
||||||
keccakf(&d.a)
|
keccakf(&d.a)
|
||||||
d.len = 0
|
d.len = 0
|
||||||
|
|
Loading…
Reference in New Issue