comparison libtomcrypt/src/encauth/ocb/ocb_done_decrypt.c @ 382:0cbe8f6dbf9e

propagate from branch 'au.asn.ucc.matt.ltc.dropbear' (head 2af22fb4e878750b88f80f90d439b316d229796f) to branch 'au.asn.ucc.matt.dropbear' (head 02c413252c90e9de8e03d91e9939dde3029f5c0a)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 11 Jan 2007 02:41:05 +0000
parents 1b9e69c058d2
children f849a5ca2efc
comparison
equal deleted inserted replaced
379:b66a00272a90 382:0cbe8f6dbf9e
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 $ */