md5.c (37421) | md5.c (46226) |
---|---|
1/* 2 * Derived from: 3 * 4 * MDDRIVER.C - test driver for MD2, MD4 and MD5 5 */ 6 7/* 8 * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All --- 5 unchanged lines hidden (view full) --- 14 * without express or implied warranty of any kind. 15 * 16 * These notices must be retained in any copies of any part of this 17 * documentation and/or software. 18 */ 19 20#ifndef lint 21static const char rcsid[] = | 1/* 2 * Derived from: 3 * 4 * MDDRIVER.C - test driver for MD2, MD4 and MD5 5 */ 6 7/* 8 * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All --- 5 unchanged lines hidden (view full) --- 14 * without express or implied warranty of any kind. 15 * 16 * These notices must be retained in any copies of any part of this 17 * documentation and/or software. 18 */ 19 20#ifndef lint 21static const char rcsid[] = |
22 "$Id$"; | 22 "$Id: md5.c,v 1.13 1998/07/06 07:04:50 charnier Exp $"; |
23#endif /* not lint */ 24 25#include <sys/types.h> 26#include <err.h> 27#include <md5.h> 28#include <stdio.h> 29#include <time.h> 30#include <unistd.h> 31 32#include "global.h" 33 34/* 35 * Length of test block, number of test blocks. 36 */ | 23#endif /* not lint */ 24 25#include <sys/types.h> 26#include <err.h> 27#include <md5.h> 28#include <stdio.h> 29#include <time.h> 30#include <unistd.h> 31 32#include "global.h" 33 34/* 35 * Length of test block, number of test blocks. 36 */ |
37#define TEST_BLOCK_LEN 1000 38#define TEST_BLOCK_COUNT 1000 | 37#define TEST_BLOCK_LEN 10000 38#define TEST_BLOCK_COUNT 100000 |
39 40static void MDString PROTO_LIST((char *)); 41static void MDTimeTrial PROTO_LIST((void)); 42static void MDTestSuite PROTO_LIST((void)); 43static void MDFilter PROTO_LIST((int)); 44static void usage PROTO_LIST((void)); 45 46/* Main driver. --- 68 unchanged lines hidden (view full) --- 115 time_t endTime, startTime; 116 unsigned char block[TEST_BLOCK_LEN]; 117 unsigned int i; 118 char *p, buf[33]; 119 120 printf 121 ("MD5 time trial. Digesting %d %d-byte blocks ...", 122 TEST_BLOCK_COUNT, TEST_BLOCK_LEN); | 39 40static void MDString PROTO_LIST((char *)); 41static void MDTimeTrial PROTO_LIST((void)); 42static void MDTestSuite PROTO_LIST((void)); 43static void MDFilter PROTO_LIST((int)); 44static void usage PROTO_LIST((void)); 45 46/* Main driver. --- 68 unchanged lines hidden (view full) --- 115 time_t endTime, startTime; 116 unsigned char block[TEST_BLOCK_LEN]; 117 unsigned int i; 118 char *p, buf[33]; 119 120 printf 121 ("MD5 time trial. Digesting %d %d-byte blocks ...", 122 TEST_BLOCK_COUNT, TEST_BLOCK_LEN); |
123 fflush(stdout); |
|
123 124 /* Initialize block */ 125 for (i = 0; i < TEST_BLOCK_LEN; i++) 126 block[i] = (unsigned char) (i & 0xff); 127 128 /* Start timer */ 129 time(&startTime); 130 --- 67 unchanged lines hidden --- | 124 125 /* Initialize block */ 126 for (i = 0; i < TEST_BLOCK_LEN; i++) 127 block[i] = (unsigned char) (i & 0xff); 128 129 /* Start timer */ 130 time(&startTime); 131 --- 67 unchanged lines hidden --- |