# std/crypto: make the whole APIs more consistent · gitcafe/zig

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

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

Visibility: public

Requested revision: fa17447090500b67c515c023376ab66201f8f088

Requested commit: fa17447090500b67c515c023376ab66201f8f088

Commit: fa17447090500b67c515c023376ab66201f8f088

Tree: 5521ad832ded1b9c38a24fec0cc02871739bd630

Author: Frank Denis

Committer: Andrew Kelley

## Message

```
std/crypto: make the whole APIs more consistent

- use `PascalCase` for all types. So, AES256GCM is now Aes256Gcm.
- consistently use `_length` instead of mixing `_size` and `_length` for the
constants we expose
- Use `minimum_key_length` when it represents an actual minimum length.
Otherwise, use `key_length`.
- Require output buffers (for ciphertexts, macs, hashes) to be of the right
size, not at least of that size in some functions, and the exact size elsewhere.
- Use a `_bits` suffix instead of `_length` when a size is represented as a
number of bits to avoid confusion.
- Functions returning a constant-sized slice are now defined as a slice instead
of a pointer + a runtime assertion. This is the case for most hash functions.
- Use `camelCase` for all functions instead of `snake_case`.

No functional changes, but these are breaking API changes.

```

## Parents

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

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