# Remove the reset\(\) function from hash functions · gitcafe/zig

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

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

Visibility: public

Requested revision: 446597bd3c935be632287a8ad6cfd72892d674e6

Requested commit: 446597bd3c935be632287a8ad6cfd72892d674e6

Commit: 446597bd3c935be632287a8ad6cfd72892d674e6

Tree: d80af39c7fd2036b2d832407cdb39c86e87cdf5b

Author: Frank Denis

Committer: Frank Denis

## Message

```
Remove the reset() function from hash functions

Justification:
- reset() is unnecessary; states that have to be reused can be copied
- reset() is error-prone. Copying a previous state prevents forgetting
  struct members.
- reset() forces implementation to store sensitive data (key, initial state)
  in memory even when they are not needed.
- reset() is confusing as it has a different meaning elsewhere in Zig.

```

## Parents

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

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