# Fix incorrect SHA-3 computation with the streaming API \(\#14852\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/134e5748e0b698d51b6daf1983d3aeb1affc142f)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 134e5748e0b698d51b6daf1983d3aeb1affc142f

Requested commit: 134e5748e0b698d51b6daf1983d3aeb1affc142f

Commit: 134e5748e0b698d51b6daf1983d3aeb1affc142f

Tree: ea89a69b316044b556f714ce6a400b7649726c65

Author: Frank Denis

Committer: GitHub

## Message

```
Fix incorrect SHA-3 computation with the streaming API (#14852)

* Fix SHA3 with streaming

Leftover bytes should be added to the buffer, not to the state.

(or, always to the state; we can and probably should eventually get
rid of the buffer)

Fixes #14851

* Add a test for SHA-3 with streaming
```

## Parents

- [6d7fb8f19c864f04d3472e5aec161957193e1e7c](https://git.cafe/gitcafe/zig/commit/6d7fb8f19c864f04d3472e5aec161957193e1e7c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/134e5748e0b698d51b6daf1983d3aeb1affc142f?format=markdown)
