Mercurial > dropbear
comparison libtomcrypt/src/encauth/gcm/gcm_done.c @ 1439:8d24733026c5 coverity
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 24 Jun 2017 23:33:16 +0800 |
parents | f849a5ca2efc |
children | 6dba84798cd5 |
comparison
equal
deleted
inserted
replaced
1400:238a439670f5 | 1439:8d24733026c5 |
---|---|
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 * | 8 * |
9 * Tom St Denis, [email protected], http://libtomcrypt.com | 9 * Tom St Denis, [email protected], http://libtom.org |
10 */ | 10 */ |
11 | 11 |
12 /** | 12 /** |
13 @file gcm_done.c | 13 @file gcm_done.c |
14 GCM implementation, Terminate the stream, by Tom St Denis | 14 GCM implementation, Terminate the stream, by Tom St Denis |
15 */ | 15 */ |
16 #include "tomcrypt.h" | 16 #include "tomcrypt.h" |
17 | 17 |
18 #ifdef GCM_MODE | 18 #ifdef LTC_GCM_MODE |
19 | 19 |
20 /** | 20 /** |
21 Terminate a GCM stream | 21 Terminate a GCM stream |
22 @param gcm The GCM state | 22 @param gcm The GCM state |
23 @param tag [out] The destination for the MAC tag | 23 @param tag [out] The destination for the MAC tag |
41 if ((err = cipher_is_valid(gcm->cipher)) != CRYPT_OK) { | 41 if ((err = cipher_is_valid(gcm->cipher)) != CRYPT_OK) { |
42 return err; | 42 return err; |
43 } | 43 } |
44 | 44 |
45 | 45 |
46 if (gcm->mode != GCM_MODE_TEXT) { | 46 if (gcm->mode != LTC_GCM_MODE_TEXT) { |
47 return CRYPT_INVALID_ARG; | 47 return CRYPT_INVALID_ARG; |
48 } | 48 } |
49 | 49 |
50 /* handle remaining ciphertext */ | 50 /* handle remaining ciphertext */ |
51 if (gcm->buflen) { | 51 if (gcm->buflen) { |
76 } | 76 } |
77 | 77 |
78 #endif | 78 #endif |
79 | 79 |
80 | 80 |
81 /* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_done.c,v $ */ | 81 /* $Source$ */ |
82 /* $Revision: 1.9 $ */ | 82 /* $Revision$ */ |
83 /* $Date: 2006/03/31 14:15:35 $ */ | 83 /* $Date$ */ |