1 // SPDX-License-Identifier: BSD-2-Clause
2 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3  *
4  * LibTomCrypt is a library that provides various cryptographic
5  * algorithms in a highly modular and flexible manner.
6  *
7  * The library is free for all purposes without any express
8  * guarantee it works.
9  */
10 /**
11     @file eax_addheader.c
12     EAX implementation, add meta-data, by Tom St Denis
13 */
14 #include "tomcrypt_private.h"
15 
16 #ifdef LTC_EAX_MODE
17 
18 /**
19     add header (metadata) to the stream
20     @param eax    The current EAX state
21     @param header The header (meta-data) data you wish to add to the state
22     @param length The length of the header data
23     @return CRYPT_OK if successful
24 */
eax_addheader(eax_state * eax,const unsigned char * header,unsigned long length)25 int eax_addheader(eax_state *eax, const unsigned char *header,
26                   unsigned long length)
27 {
28    LTC_ARGCHK(eax    != NULL);
29    LTC_ARGCHK(header != NULL);
30    return omac_process(&eax->headeromac, header, length);
31 }
32 
33 #endif
34 
35 /* ref:         $Format:%D$ */
36 /* git commit:  $Format:%H$ */
37 /* commit time: $Format:%ai$ */
38