# std.crypto.aegis: Absorb ad instead of encrypting it\. · gitcafe/zig

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

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

Visibility: public

Requested revision: 7abd62800cde3f42c0ef65126ed478a0c3d3d549

Requested commit: 7abd62800cde3f42c0ef65126ed478a0c3d3d549

Commit: 7abd62800cde3f42c0ef65126ed478a0c3d3d549

Tree: 6a24bb1a43921e899631f65e7a84850ff9728492

Author: Erik Schlyter

Committer: Alex Rønne Petersen

## Message

```
std.crypto.aegis: Absorb ad instead of encrypting it.

`Aegis256XGeneric` behaves differently than `Aegis128XGeneric` in that
it currently encrypts associated data instead of just absorbing it. Even
though the end result is the same, there's no point in encrypting and
copying the ad into a buffer that gets overwritten anyway. This fix
makes `Aegis256XGeneric` behave the same as `Aegis128XGeneric`.

```

## Parents

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

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