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:
parent
ccc2836fa8
commit
b26a9c7274
7 changed files with 43 additions and 91 deletions
6
auth.h
6
auth.h
|
@ -19,11 +19,11 @@
|
|||
|
||||
|
||||
struct lc_auth_impl {
|
||||
int (*init)(void *, const uint8_t *, size_t);
|
||||
int (*init)(void *, const void *);
|
||||
int (*update)(void *, const uint8_t *, size_t);
|
||||
int (*final)(void *, uint8_t *, size_t *);
|
||||
int (*auth)(uint8_t *, size_t *, const uint8_t *, size_t,
|
||||
const uint8_t *, size_t);
|
||||
int (*auth)(uint8_t *, size_t *, const void *, const uint8_t *,
|
||||
size_t);
|
||||
|
||||
void *(*ctx_new)(void);
|
||||
void (*ctx_free)(void *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue