Mercurial > dropbear
comparison libtomcrypt/src/encauth/eax/eax_addheader.c @ 1511:5916af64acd4 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 17 Feb 2018 19:29:51 +0800 |
parents | 6dba84798cd5 |
children |
comparison
equal
deleted
inserted
replaced
1457:32f990cc96b1 | 1511:5916af64acd4 |
---|---|
3 * LibTomCrypt is a library that provides various cryptographic | 3 * LibTomCrypt is a library that provides various cryptographic |
4 * algorithms in a highly modular and flexible manner. | 4 * algorithms in a highly modular and flexible manner. |
5 * | 5 * |
6 * The library is free for all purposes without any express | 6 * The library is free for all purposes without any express |
7 * guarantee it works. | 7 * guarantee it works. |
8 * | |
9 * Tom St Denis, [email protected], http://libtom.org | |
10 */ | 8 */ |
11 /** | 9 /** |
12 @file eax_addheader.c | 10 @file eax_addheader.c |
13 EAX implementation, add meta-data, by Tom St Denis | 11 EAX implementation, add meta-data, by Tom St Denis |
14 */ | 12 */ |
15 #include "tomcrypt.h" | 13 #include "tomcrypt.h" |
16 | 14 |
17 #ifdef LTC_EAX_MODE | 15 #ifdef LTC_EAX_MODE |
18 | 16 |
19 /** | 17 /** |
20 add header (metadata) to the stream | 18 add header (metadata) to the stream |
21 @param eax The current EAX state | 19 @param eax The current EAX state |
22 @param header The header (meta-data) data you wish to add to the state | 20 @param header The header (meta-data) data you wish to add to the state |
23 @param length The length of the header data | 21 @param length The length of the header data |
24 @return CRYPT_OK if successful | 22 @return CRYPT_OK if successful |
25 */ | 23 */ |
26 int eax_addheader(eax_state *eax, const unsigned char *header, | 24 int eax_addheader(eax_state *eax, const unsigned char *header, |
27 unsigned long length) | 25 unsigned long length) |
28 { | 26 { |
29 LTC_ARGCHK(eax != NULL); | 27 LTC_ARGCHK(eax != NULL); |
30 LTC_ARGCHK(header != NULL); | 28 LTC_ARGCHK(header != NULL); |
31 return omac_process(&eax->headeromac, header, length); | 29 return omac_process(&eax->headeromac, header, length); |
32 } | 30 } |
33 | 31 |
34 #endif | 32 #endif |
35 | 33 |
36 /* $Source$ */ | 34 /* ref: $Format:%D$ */ |
37 /* $Revision$ */ | 35 /* git commit: $Format:%H$ */ |
38 /* $Date$ */ | 36 /* commit time: $Format:%ai$ */ |