Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/libs/tomcrypt/src/encauth/eax/eax_addheader.c
5972 views
1
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
2
*
3
* LibTomCrypt is a library that provides various cryptographic
4
* algorithms in a highly modular and flexible manner.
5
*
6
* The library is free for all purposes without any express
7
* guarantee it works.
8
*/
9
/**
10
@file eax_addheader.c
11
EAX implementation, add meta-data, by Tom St Denis
12
*/
13
#include "tomcrypt.h"
14
15
#ifdef LTC_EAX_MODE
16
17
/**
18
add header (metadata) to the stream
19
@param eax The current EAX state
20
@param header The header (meta-data) data you wish to add to the state
21
@param length The length of the header data
22
@return CRYPT_OK if successful
23
*/
24
int eax_addheader(eax_state *eax, const unsigned char *header,
25
unsigned long length)
26
{
27
LTC_ARGCHK(eax != NULL);
28
LTC_ARGCHK(header != NULL);
29
return omac_process(&eax->headeromac, header, length);
30
}
31
32
#endif
33
34