Mercurial > dropbear
comparison libtomcrypt/src/encauth/ocb/ocb_done_decrypt.c @ 415:8b9aba1d5fa4 channel-fix
merge of '73fe066c5d9e2395354ba74756124d45c978a04d'
and 'f5014cc84558f1e8eba42dbecf9f72f94bfe6134'
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 06 Feb 2007 16:00:18 +0000 |
parents | 0cbe8f6dbf9e |
children | f849a5ca2efc |
comparison
equal
deleted
inserted
replaced
414:c53a26c430e5 | 415:8b9aba1d5fa4 |
---|---|
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.org | 9 * Tom St Denis, [email protected], http://libtomcrypt.com |
10 */ | 10 */ |
11 | 11 |
12 /** | 12 /** |
13 @file ocb_done_decrypt.c | 13 @file ocb_done_decrypt.c |
14 OCB implementation, terminate decryption, by Tom St Denis | 14 OCB implementation, terminate decryption, by Tom St Denis |
55 tagbuflen = MAXBLOCKSIZE; | 55 tagbuflen = MAXBLOCKSIZE; |
56 if ((err = s_ocb_done(ocb, ct, ctlen, pt, tagbuf, &tagbuflen, 1)) != CRYPT_OK) { | 56 if ((err = s_ocb_done(ocb, ct, ctlen, pt, tagbuf, &tagbuflen, 1)) != CRYPT_OK) { |
57 goto LBL_ERR; | 57 goto LBL_ERR; |
58 } | 58 } |
59 | 59 |
60 if (taglen <= tagbuflen && memcmp(tagbuf, tag, taglen) == 0) { | 60 if (taglen <= tagbuflen && XMEMCMP(tagbuf, tag, taglen) == 0) { |
61 *stat = 1; | 61 *stat = 1; |
62 } | 62 } |
63 | 63 |
64 err = CRYPT_OK; | 64 err = CRYPT_OK; |
65 LBL_ERR: | 65 LBL_ERR: |
74 | 74 |
75 #endif | 75 #endif |
76 | 76 |
77 | 77 |
78 /* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_done_decrypt.c,v $ */ | 78 /* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_done_decrypt.c,v $ */ |
79 /* $Revision: 1.3 $ */ | 79 /* $Revision: 1.5 $ */ |
80 /* $Date: 2005/05/05 14:35:58 $ */ | 80 /* $Date: 2006/11/01 09:28:17 $ */ |