@@ -85,9 +85,9 @@ func newCShake(N, S []byte, rate, outputLen int, dsbyte byte) ShakeHash { |
|
|
85 |
85 |
|
86 |
86 |
// leftEncode returns max 9 bytes |
87 |
87 |
c.initBlock = make([]byte, 0, 9*2+len(N)+len(S)) |
88 |
|
-c.initBlock = append(c.initBlock, leftEncode(uint64(len(N)*8))...) |
|
88 |
+c.initBlock = append(c.initBlock, leftEncode(uint64(len(N))*8)...) |
89 |
89 |
c.initBlock = append(c.initBlock, N...) |
90 |
|
-c.initBlock = append(c.initBlock, leftEncode(uint64(len(S)*8))...) |
|
90 |
+c.initBlock = append(c.initBlock, leftEncode(uint64(len(S))*8)...) |
91 |
91 |
c.initBlock = append(c.initBlock, S...) |
92 |
92 |
c.Write(bytepad(c.initBlock, c.rate)) |
93 |
93 |
return &c |