/* This file was auto-generated by KreMLin! */
#include "kremlib.h"
#ifndef __Chacha20Poly1305_H
#define __Chacha20Poly1305_H


#include "Hacl_Policies.h"
#include "Chacha20.h"
#include "AEAD_Poly1305_64.h"

extern Prims_int Chacha20Poly1305_noncelen;

extern Prims_int Chacha20Poly1305_keylen;

extern Prims_int Chacha20Poly1305_maclen;

typedef Hacl_Impl_Poly1305_64_State_poly1305_state Chacha20Poly1305_state;

typedef void *Chacha20Poly1305_log_t;

void Chacha20Poly1305_encode_length(uint8_t *lb, uint32_t aad_len, uint32_t mlen);

uint32_t
Chacha20Poly1305_aead_encrypt_(
  uint8_t *c,
  uint8_t *mac,
  uint8_t *m,
  uint32_t mlen,
  uint8_t *aad1,
  uint32_t aadlen,
  uint8_t *k1,
  uint8_t *n1
);

uint32_t
Chacha20Poly1305_aead_encrypt(
  uint8_t *c,
  uint8_t *mac,
  uint8_t *m,
  uint32_t mlen,
  uint8_t *aad1,
  uint32_t aadlen,
  uint8_t *k1,
  uint8_t *n1
);

uint32_t
Chacha20Poly1305_aead_decrypt(
  uint8_t *m,
  uint8_t *c,
  uint32_t mlen,
  uint8_t *mac,
  uint8_t *aad1,
  uint32_t aadlen,
  uint8_t *k1,
  uint8_t *n1
);
#endif
