1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */ 2 /* SPDX-License-Identifier: Unlicense */ 3 /** 4 @file eax_addheader.c 5 EAX implementation, add meta-data, by Tom St Denis 6 */ 7 #include "tomcrypt_private.h" 8 9 #ifdef LTC_EAX_MODE 10 11 /** 12 add header (metadata) to the stream 13 @param eax The current EAX state 14 @param header The header (meta-data) data you wish to add to the state 15 @param length The length of the header data 16 @return CRYPT_OK if successful 17 */ eax_addheader(eax_state * eax,const unsigned char * header,unsigned long length)18int eax_addheader(eax_state *eax, const unsigned char *header, 19 unsigned long length) 20 { 21 LTC_ARGCHK(eax != NULL); 22 LTC_ARGCHK(header != NULL); 23 return omac_process(&eax->headeromac, header, length); 24 } 25 26 #endif 27