Path: blob/master/libs/tomcrypt/src/encauth/eax/eax_addheader.c
5972 views
/* LibTomCrypt, modular cryptographic library -- Tom St Denis1*2* LibTomCrypt is a library that provides various cryptographic3* algorithms in a highly modular and flexible manner.4*5* The library is free for all purposes without any express6* guarantee it works.7*/8/**9@file eax_addheader.c10EAX implementation, add meta-data, by Tom St Denis11*/12#include "tomcrypt.h"1314#ifdef LTC_EAX_MODE1516/**17add header (metadata) to the stream18@param eax The current EAX state19@param header The header (meta-data) data you wish to add to the state20@param length The length of the header data21@return CRYPT_OK if successful22*/23int eax_addheader(eax_state *eax, const unsigned char *header,24unsigned long length)25{26LTC_ARGCHK(eax != NULL);27LTC_ARGCHK(header != NULL);28return omac_process(&eax->headeromac, header, length);29}3031#endif323334