# ghash & poly1305: fix handling of partial blocks and add pad\(\) · gitcafe/zig

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

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

Visibility: public

Requested revision: d343b75e7fa11d94e9668fb306b9e6b2ba68a0da

Requested commit: d343b75e7fa11d94e9668fb306b9e6b2ba68a0da

Commit: d343b75e7fa11d94e9668fb306b9e6b2ba68a0da

Tree: 01171c58d9aec7ec9e7e314f8bef4a1b630fe734

Author: Frank Denis

Committer: Frank Denis

## Message

```
ghash & poly1305: fix handling of partial blocks and add pad()

pad() aligns the next input to the first byte of a block, which is
useful to implement the IETF version of ChaCha20Poly1305 and AES-GCM.

```

## Parents

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

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