auth: replace init args with a implementation-specific params struct

This allows for more flexibility in the future.

This commit breaks ChaCha20-Poly1305. It'll be fixed in a subsequent
commit.
This commit is contained in:
Lucas Gabriel Vuotto 2024-06-07 18:40:14 +00:00
parent ccc2836fa8
commit b26a9c7274
7 changed files with 43 additions and 91 deletions

View file

@ -123,11 +123,11 @@ struct lc_auth_ctx;
struct lc_auth_impl;
int lc_auth_init(struct lc_auth_ctx *, const uint8_t *, size_t);
int lc_auth_init(struct lc_auth_ctx *, const void *);
int lc_auth_update(struct lc_auth_ctx *, const uint8_t *, size_t);
int lc_auth_final(struct lc_auth_ctx *, uint8_t *, size_t *);
int lc_auth(const struct lc_auth_impl *, uint8_t *, size_t *,
const uint8_t *, size_t, const uint8_t *, size_t);
const void *, const uint8_t *, size_t);
struct lc_auth_ctx *lc_auth_ctx_new(const struct lc_auth_impl *);
void lc_auth_ctx_free(struct lc_auth_ctx *);