Mercurial > dropbear
comparison libtomcrypt/src/encauth/ocb/ocb_done_decrypt.c @ 398:59c7938af2bd
merge of '1250b8af44b62d8f4fe0f8d9fc7e7a1cc34e7e1c'
and '7f8670ac3bb975f40967f3979d09d2199b7e90c8'
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 03 Feb 2007 08:20:30 +0000 |
parents | 0cbe8f6dbf9e |
children | f849a5ca2efc |
comparison
equal
deleted
inserted
replaced
396:e7c1a77d2921 | 398:59c7938af2bd |
---|---|
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 $ */ |