master
magical 2015-01-01 03:10:11 -08:00
parent 0b361a2be7
commit 33dc508782
3 changed files with 6 additions and 7 deletions

2
gen.go
View File

@ -48,7 +48,7 @@ func mul(a, b int) int { return a * b }
func mod(a, b int) int { return a % b }
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 {

View File

@ -1,4 +1,3 @@
package keccak
// roundGeneric implements one round of the keccak-f[1600] permutation.

View File

@ -52,11 +52,11 @@ func (d *digest) flush() {
b := d.buf[:d.len]
loop:
for i := range d.a {
if len(b) == 0 {
break loop
}
d.a[i] ^= le64dec(b)
b = b[8:]
if len(b) == 0 {
break loop
}
d.a[i] ^= le64dec(b)
b = b[8:]
}
keccakf(&d.a)
d.len = 0