comparison src/encauth/ocb/ocb_done_decrypt.c @ 381:999a5eb4ed10 libtomcrypt-dropbear

propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28) to branch 'au.asn.ucc.matt.ltc.dropbear' (head 20dccfc09627970a312d77fb41dc2970b62689c3)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 11 Jan 2007 02:39:21 +0000
parents d5faf4814ddb
children
comparison
equal deleted inserted replaced
281:997e6f7dc01e 381:999a5eb4ed10
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 $ */