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
12 GCM implementation, reset a used state so it can accept IV data, by Tom St Denis
19 Reset a GCM state to as if you just called gcm_init(). This saves the initialization time.
20 @param gcm The GCM state to reset
21 @return CRYPT_OK on success
23 int gcm_reset(gcm_state *gcm)
25 LTC_ARGCHK(gcm != NULL);
27 zeromem(gcm->buf, sizeof(gcm->buf));
28 zeromem(gcm->X, sizeof(gcm->X));
29 gcm->mode = LTC_GCM_MODE_IV;
40 /* ref: $Format:%D$ */
41 /* git commit: $Format:%H$ */
42 /* commit time: $Format:%ai$ */