From 09e905bb7bb9c02f8a719879204b773c700dd8c0 Mon Sep 17 00:00:00 2001 From: asterix Date: Thu, 15 Feb 2007 13:29:49 +0000 Subject: [PATCH] Add MD2_DIGEST_LEN macro. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@784 38d2e660-2303-0410-9eaa-f027e97ec537 --- algos/md2.c | 5 ++++- algos/md2.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/algos/md2.c b/algos/md2.c index edd9fa8c..fa310b46 100755 --- a/algos/md2.c +++ b/algos/md2.c @@ -23,6 +23,9 @@ /*#* *#* $Log$ + *#* Revision 1.16 2007/02/15 13:29:49 asterix + *#* Add MD2_DIGEST_LEN macro. + *#* *#* Revision 1.15 2007/02/06 15:53:34 asterix *#* Add ROTR macro in m2d_perm, add comments, typos. *#* @@ -322,7 +325,7 @@ bool md2_test(void) md2_init(&context); md2_update(&context, test[i], strlen(test[i])); - if(memcmp(result[i], md2_end(&context), CONFIG_MD2_BLOCK_LEN)) + if(memcmp(result[i], md2_end(&context), MD2_DIGEST_LEN)) return false; } diff --git a/algos/md2.h b/algos/md2.h index bf8c67ac..07292186 100755 --- a/algos/md2.h +++ b/algos/md2.h @@ -21,6 +21,9 @@ /*#* *#* $Log$ + *#* Revision 1.7 2007/02/15 13:29:49 asterix + *#* Add MD2_DIGEST_LEN macro. + *#* *#* Revision 1.6 2007/02/02 18:15:31 asterix *#* Add function MD2_test. Fix bug in md2_update function. *#* @@ -49,7 +52,7 @@ #define NUM_COMPUTE_ROUNDS 18 ///< Number of compute rounds. #define COMPUTE_ARRAY_LEN CONFIG_MD2_BLOCK_LEN * 3 ///< Lenght of compute array. - +#define MD2_DIGEST_LEN CONFIG_MD2_BLOCK_LEN /** * Context for MD2 computation. */ -- 2.25.1