1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
6 * The library is free for all purposes without any express
14 Reset a CCM state to as if you just called ccm_init(). This saves the initialization time.
15 @param ccm The CCM state to reset
16 @return CRYPT_OK on success
18 int ccm_reset(ccm_state *ccm)
20 LTC_ARGCHK(ccm != NULL);
21 zeromem(ccm->PAD, sizeof(ccm->PAD));
22 zeromem(ccm->ctr, sizeof(ccm->ctr));
23 zeromem(ccm->CTRPAD, sizeof(ccm->CTRPAD));
25 ccm->current_ptlen = 0;
26 ccm->current_aadlen = 0;
33 /* ref: $Format:%D$ */
34 /* git commit: $Format:%H$ */
35 /* commit time: $Format:%ai$ */